From f25d710416cb6fee1f06cb86e07a70e797a199d1 Mon Sep 17 00:00:00 2001 From: Martin Lucina Date: Mon, 12 Oct 2015 11:58:08 +0200 Subject: [PATCH] Fix hypervisor magic byte order --- platform/hw/arch/x86/hypervisor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/hw/arch/x86/hypervisor.c b/platform/hw/arch/x86/hypervisor.c index c67e1c5..1dcaa7a 100644 --- a/platform/hw/arch/x86/hypervisor.c +++ b/platform/hw/arch/x86/hypervisor.c @@ -53,13 +53,13 @@ int hypervisor_detect(void) if (ebx == 0x566e6558 && ecx == 0x65584d4d && edx == 0x4d4d566e) return HYPERVISOR_XEN; /* VMware: "VMwareVMware" */ - else if (ebx == 0x564d7761 && ecx == 0x7265564d && edx == 0x77617265) + else if (ebx == 0x61774d56 && ecx == 0x4d566572 && edx == 0x65726177) return HYPERVISOR_VMWARE; /* Hyper-V: "Microsoft Hv" */ - else if (ebx == 0x4d696372 && ecx == 0x6f736f66 && edx == 0x74204876) + else if (ebx == 0x7263694d && ecx == 0x666f736f && edx == 0x76482074) return HYPERVISOR_HYPERV; /* KVM: "KVMKVMKVM\0\0\0" */ - else if (ebx == 0x4b564d4b && ecx == 0x564d4b56 && edx == 0x4d000000) + else if (ebx == 0x4b4d564b && ecx == 0x564b4d56 && edx == 0x0000004d) return HYPERVISOR_KVM; return 0; -- 2.39.5