KVM: X86: Don't block vCPU if there is pending exception
authorWanpeng Li <wanpeng.li@hotmail.com>
Wed, 13 Sep 2017 11:04:01 +0000 (04:04 -0700)
committerRadim Krčmář <rkrcmar@redhat.com>
Thu, 14 Sep 2017 15:16:14 +0000 (17:16 +0200)
Don't block vCPU if there is pending exception.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/x86.c

index f4a978e3603075e25e28cf02875356cd30c1856a..bfda79fb102c459c05393311fd81633cd8ba45d6 100644 (file)
@@ -8461,6 +8461,9 @@ static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu)
        if (vcpu->arch.pv.pv_unhalted)
                return true;
 
+       if (vcpu->arch.exception.pending)
+               return true;
+
        if (kvm_test_request(KVM_REQ_NMI, vcpu) ||
            (vcpu->arch.nmi_pending &&
             kvm_x86_ops->nmi_allowed(vcpu)))