launched is a bool, and thus its size is one byte. If we are lucky the compiler places nothing interesting close to it and a cmpl just works. But if we are unlucky, we read a nonzero value and do a vmresume on a non-launched VMCS. Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> --- x86/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x86/vmx.c b/x86/vmx.c index 8228f48..da5daa8 100644 --- a/x86/vmx.c +++ b/x86/vmx.c @@ -968,7 +968,7 @@ static int vmx_run() "mov %[HOST_RSP], %%rdi\n\t" "vmwrite %%rsp, %%rdi\n\t" LOAD_GPR_C - "cmpl $0, %[launched]\n\t" + "cmpb $0, %[launched]\n\t" "jne 1f\n\t" "vmlaunch\n\t" "jmp 2f\n\t" -- 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