lkml.org 
[lkml]   [2013]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/4] x86: properly handle kvm emulation of hyperv
Date
Recent kvm has some basic support of hyperv, this will cause the guest to
identify itself as running on top of hyperv instead of kvm which will disable
kvm pv functionality. This is because we try to detect hyperv before kvm. Solve
this by simply checking kvm in detect_hypervisor() first.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
arch/x86/kernel/cpu/hypervisor.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c
index 8727921..3e149b6 100644
--- a/arch/x86/kernel/cpu/hypervisor.c
+++ b/arch/x86/kernel/cpu/hypervisor.c
@@ -36,10 +36,10 @@ static const __initconst struct hypervisor_x86 * const hypervisors[] =
&x86_hyper_xen_hvm,
#endif
&x86_hyper_vmware,
- &x86_hyper_ms_hyperv,
#ifdef CONFIG_KVM_GUEST
&x86_hyper_kvm,
#endif
+ &x86_hyper_ms_hyperv,
};

const struct hypervisor_x86 *x86_hyper;
--
1.7.1


\
 
 \ /
  Last update: 2013-07-23 12:41    [W:0.091 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site