]> xenbits.xensource.com Git - osstest/rumprun.git/commitdiff
Don't test hypervisor magic if HV base leaf is not supported
authorMartin Lucina <martin@lucina.net>
Mon, 12 Oct 2015 10:01:11 +0000 (12:01 +0200)
committerMartin Lucina <martin@lucina.net>
Mon, 12 Oct 2015 10:01:11 +0000 (12:01 +0200)
platform/hw/arch/x86/hypervisor.c

index 1dcaa7a08cba76edd9342652d4f41022e7bc757f..00ccbf6cfbbe06fd84000aac5bd1e7c8254b20f8 100644 (file)
@@ -49,6 +49,8 @@ int hypervisor_detect(void)
         * Source: https://lkml.org/lkml/2008/10/1/246
         */
        x86_cpuid(0x40000000, &eax, &ebx, &ecx, &edx);
+       if (!(eax >= 0x40000000))
+               return 0;
        /* Xen: "XenVMMXenVMM" */
        if (ebx == 0x566e6558 && ecx == 0x65584d4d && edx == 0x4d4d566e)
                return HYPERVISOR_XEN;