summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorWanpeng Li <wanpeng.li@hotmail.com>2017-08-24 03:35:08 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2017-08-24 18:09:19 +0200
commit274bba52a01d6de01f03cfb1b80af2d35772e62e (patch)
treed40e9f463944c04cbd46792d4827096c98bbda8f /arch/x86/kvm/vmx.c
parent09f037aa48f34c84e70c5a6ef4870b2dee3aee76 (diff)
KVM: VMX: use kvm_event_needs_reinjection
Use kvm_event_needs_reinjection() encapsulation. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 31ab27ea2318..1ee5fe7ea5ff 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -11012,9 +11012,7 @@ static int vmx_check_nested_events(struct kvm_vcpu *vcpu, bool external_intr)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
- if (vcpu->arch.exception.pending ||
- vcpu->arch.nmi_injected ||
- vcpu->arch.interrupt.pending)
+ if (kvm_event_needs_reinjection(vcpu))
return -EBUSY;
if (nested_cpu_has_preemption_timer(get_vmcs12(vcpu)) &&