qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Fix nmi injection failure when vcpu got blocked


From: Zhuangyanying
Subject: Re: [Qemu-devel] [PATCH] Fix nmi injection failure when vcpu got blocked
Date: Thu, 25 May 2017 06:50:18 +0000

> -----Original Message-----
> From: Radim Krčmář [mailto:address@hidden
> Sent: Wednesday, May 24, 2017 10:34 PM
> To: Zhuangyanying
> Cc: address@hidden; Herongguang (Stephen); address@hidden;
> Gonglei (Arei); Zhangbo (Oscar); address@hidden
> Subject: Re: [PATCH] Fix nmi injection failure when vcpu got blocked
> 
> Please use tags in patches.
> We usually begin the subject with "KVM: x86:" when touching
> arch/x86/kvm/x86.c.
> 
Sorry, I will add in patch v2.
> 2017-05-24 13:48+0800, Zhuangyanying:
> > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c @@ -8394,7
> > +8394,8 @@ static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu)
> >     if (vcpu->arch.pv.pv_unhalted)
> >             return true;
> >
> > -   if (atomic_read(&vcpu->arch.nmi_queued))
> > +   if (vcpu->arch.nmi_pending ||
> > +       atomic_read(&vcpu->arch.nmi_queued))
> >             return true;
> 
> Hm, I think we've been missing '&& kvm_x86_ops->nmi_allowed(vcpu)'.
> 
Yes, we've been missing, I will add in patch v2.
> The undesired resume if we have suppressed NMI is not making it much worse,
> but wouldn't "kvm_test_request(KVM_REQ_NMI, vcpu)" also work here?
> 
> >     if (kvm_test_request(KVM_REQ_SMI, vcpu))
> 
> Thanks.
"kvm_test_request(KVM_REQ_NMI, vcpu)", works fine for me.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]