hv: vmbus_drv: detect hyperv through x86_hyper
authorJason Wang <jasowang@redhat.com>
Fri, 31 Aug 2012 05:32:44 +0000 (13:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Sep 2012 22:55:34 +0000 (15:55 -0700)
commit1f94ea8181a9305a5d5cf635a6a4e9ac8ee3d2c3
tree995ce59ace664ddcbab58a4042dac1b8e8e346f4
parent82aceae4f0d42f03d9ad7d1e90389e731153898f
hv: vmbus_drv: detect hyperv through x86_hyper

There are two reasons we need to use x86_hyper instead of
query_hypervisor_presence():

- Not only hyperv but also other hypervisors such as kvm would set
  X86_FEATURE_HYTPERVISOR, so query_hypervisor_presence() will return true even
  in kvm. This may cause extra delay of 5 seconds before failing the probing in
  kvm guest.
- The hypervisor has been detected in init_hypervisor(), so no need to do the
  work again.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/vmbus_drv.c