RDPMC can cause a general protection fault if ECX is not within the valid range for performance counters. Tweak the test to ensure that ECX is valid. Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> --- x86/vmx_tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c index b3ddec6..d851692 100644 --- a/x86/vmx_tests.c +++ b/x86/vmx_tests.c @@ -733,7 +733,7 @@ asm( "insn_hlt: hlt;ret\n\t" "insn_invlpg: invlpg 0x12345678;ret\n\t" "insn_mwait: mwait;ret\n\t" - "insn_rdpmc: rdpmc;ret\n\t" + "insn_rdpmc: xor %ecx, %ecx; rdpmc;ret\n\t" "insn_rdtsc: rdtsc;ret\n\t" "insn_cr3_load: mov cr3,%rax; mov %rax,%cr3;ret\n\t" "insn_cr3_store: mov %cr3,%rax;ret\n\t" -- 2.5.0 -- 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