Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324396
b: refs/heads/master
c: 1f94ea8
h: refs/heads/master
v: v3
  • Loading branch information
Jason Wang authored and Greg Kroah-Hartman committed Sep 4, 2012
1 parent e6bb767 commit df33165
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 82aceae4f0d42f03d9ad7d1e90389e731153898f
refs/heads/master: 1f94ea8181a9305a5d5cf635a6a4e9ac8ee3d2c3
25 changes: 2 additions & 23 deletions trunk/drivers/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/completion.h>
#include <linux/hyperv.h>
#include <asm/hyperv.h>
#include <asm/hypervisor.h>
#include "hyperv_vmbus.h"


Expand Down Expand Up @@ -719,33 +720,11 @@ static struct acpi_driver vmbus_acpi_driver = {
},
};

/*
* query_hypervisor_presence
* - Query the cpuid for presence of windows hypervisor
*/
static int query_hypervisor_presence(void)
{
unsigned int eax;
unsigned int ebx;
unsigned int ecx;
unsigned int edx;
unsigned int op;

eax = 0;
ebx = 0;
ecx = 0;
edx = 0;
op = HVCPUID_VERSION_FEATURES;
cpuid(op, &eax, &ebx, &ecx, &edx);

return ecx & HV_PRESENT_BIT;
}

static int __init hv_acpi_init(void)
{
int ret, t;

if (!query_hypervisor_presence())
if (x86_hyper != &x86_hyper_ms_hyperv)
return -ENODEV;

init_completion(&probe_event);
Expand Down

0 comments on commit df33165

Please sign in to comment.