From: Wanpeng Li Date: Thu, 24 Aug 2017 10:35:08 +0000 (-0700) Subject: KVM: VMX: use kvm_event_needs_reinjection X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=274bba52a01d6de01f03cfb1b80af2d35772e62e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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 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)) &&