From: Wanpeng Li Date: Thu, 24 Aug 2017 10:35:08 +0000 (-0700) Subject: KVM: VMX: use kvm_event_needs_reinjection X-Git-Tag: v4.14-rc1~88^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=274bba52a01d6de01f03cfb1b80af2d35772e62e;p=platform%2Fkernel%2Flinux-rpi3.git KVM: VMX: use kvm_event_needs_reinjection Use kvm_event_needs_reinjection() encapsulation. Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 31ab27e..1ee5fe7 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)) &&