If cpuid is called with function value greater than max supported one
max supported value is used instead and index parameter is honored. That
is why we need to initialize index to same value in the test to get
same result from both cpuid invocations.
diff --git a/x86/realmode.c b/x86/realmode.c
index c57e033..0e1cd37 100644
--- a/x86/realmode.c
+++ b/x86/realmode.c
@@ -1375,6 +1375,7 @@ static void test_cpuid(void)
unsigned eax, ebx, ecx, edx;
inregs.eax = eax = function;
+ inregs.ecx = ecx = 0;
asm("cpuid" : "+a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx));
exec_in_big_real_mode(&insn_cpuid);
report("cpuid", R_AX|R_BX|R_CX|R_DX,
--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html