ECX is initialized to 0 in case the highest CPUID leaf has sub-functions (as is the case for 0xD on processors with XSAVE). However, this was only happening in the big real mode case due to a typo in the asm constraint. Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> --- x86/realmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x86/realmode.c b/x86/realmode.c index 1d92a86..740f8ff 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -1388,7 +1388,7 @@ static void test_cpuid(void) inregs.eax = eax = function; inregs.ecx = ecx = 0; - asm("cpuid" : "+a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx)); + 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, outregs.eax == eax && outregs.ebx == ebx -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html