hyperv/vmbus: Get rid of max_leaf detection; this is actually not used.

It will be replaced by a new one.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
This commit is contained in:
sephe 2016-04-11 03:14:28 +00:00
parent 1cae14fc17
commit 43950de88e

View File

@ -69,35 +69,6 @@ hv_get_timecount(struct timecounter *tc)
return (now);
}
/**
* @brief Get version of the windows hypervisor
*/
static int
hv_vmbus_get_hypervisor_version(void)
{
u_int regs[4];
unsigned int maxLeaf;
unsigned int op;
/*
* Its assumed that this is called after confirming that
* Viridian is present
* Query id and revision.
*/
op = HV_CPU_ID_FUNCTION_HV_VENDOR_AND_MAX_FUNCTION;
do_cpuid(op, regs);
maxLeaf = regs[0];
op = HV_CPU_ID_FUNCTION_HV_INTERFACE;
do_cpuid(op, regs);
if (maxLeaf >= HV_CPU_ID_FUNCTION_MS_HV_VERSION) {
op = HV_CPU_ID_FUNCTION_MS_HV_VERSION;
do_cpuid(op, regs);
}
return (maxLeaf);
}
/**
* @brief Invoke the specified hypercall
*/
@ -147,7 +118,6 @@ hv_vmbus_do_hypercall(uint64_t control, void* input, void* output)
int
hv_vmbus_init(void)
{
int max_leaf;
hv_vmbus_x64_msr_hypercall_contents hypercall_msr;
void* virt_addr = 0;
@ -164,8 +134,6 @@ hv_vmbus_init(void)
if (vm_guest != VM_GUEST_HV)
goto cleanup;
max_leaf = hv_vmbus_get_hypervisor_version();
/*
* Write our OS info
*/