Skip to content

Commit

Permalink
KVM: VMX: Stop invalid guest state emulation on pending event
Browse files Browse the repository at this point in the history
Process the event, possibly injecting an interrupt, before continuing.

Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Avi Kivity committed Jul 9, 2012
1 parent 612e89f commit de87dcd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit de87dcd

Please sign in to comment.