From: Avi Kivity Date: Tue, 12 Jun 2012 17:21:38 +0000 (+0300) Subject: KVM: VMX: Stop invalid guest state emulation on pending event X-Git-Tag: next-20120724~30^2~25 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=de87dcddc70ec6a90adfcc81f0ad7d84a892ffce;p=karo-tx-linux.git KVM: VMX: Stop invalid guest state emulation on pending event Process the event, possibly injecting an interrupt, before continuing. Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 2e51e7c6d2a8..a62f92ab1be2 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -4986,6 +4986,9 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu) if (intr_window_requested && vmx_interrupt_allowed(vcpu)) return handle_interrupt_window(&vmx->vcpu); + if (test_bit(KVM_REQ_EVENT, &vcpu->requests)) + return 1; + err = emulate_instruction(vcpu, 0); if (err == EMULATE_DO_MMIO) {