From: Anupam Chanda Date: Fri, 8 Jul 2011 18:42:50 +0000 (-0700) Subject: x86, hyper: Change hypervisor detection order X-Git-Tag: MMI-PSA29.97-13-9~18889^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=24a42bae6852d27ae569757f5415c91538e6a255;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git x86, hyper: Change hypervisor detection order Detect Xen before HyperV because in Viridian compatibility mode Xen presents itself as HyperV. Move Xen to the top since it seems more likely that Xen would emulate VMware than vice versa. Signed-off-by: Anupam Chanda Link: http://lkml.kernel.org/r/1310150570-26810-1-git-send-email-achanda@nicira.com Acked-by: Stefano Stabellini Acked-by: Yaozu (Eddie) Dong Reviewed-by: H. Peter Anvin Signed-off-by: H. Peter Anvin --- diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c index 8095f8611f8a..755f64fb0743 100644 --- a/arch/x86/kernel/cpu/hypervisor.c +++ b/arch/x86/kernel/cpu/hypervisor.c @@ -32,11 +32,11 @@ */ static const __initconst struct hypervisor_x86 * const hypervisors[] = { - &x86_hyper_vmware, - &x86_hyper_ms_hyperv, #ifdef CONFIG_XEN_PVHVM &x86_hyper_xen_hvm, #endif + &x86_hyper_vmware, + &x86_hyper_ms_hyperv, }; const struct hypervisor_x86 *x86_hyper;