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

2017-05-25 Thread Paolo Bonzini
On 24/05/2017 16:34, Radim Krčmář wrote: >> -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)'. > > The undesired re

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

2017-05-24 Thread Zhuangyanying
> -Original Message- > From: Radim Krčmář [mailto:rkrc...@redhat.com] > Sent: Wednesday, May 24, 2017 10:34 PM > To: Zhuangyanying > Cc: pbonz...@redhat.com; Herongguang (Stephen); qemu-devel@nongnu.org; > Gonglei (Arei); Zhangbo (Oscar); k...@vger.kernel.org > Subject: Re: [PATCH] Fix nmi

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

2017-05-24 Thread Radim Krčmář
Please use tags in patches. We usually begin the subject with "KVM: x86:" when touching arch/x86/kvm/x86.c. 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) >

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

2017-05-23 Thread Zhuangyanying
From: ZhuangYanying Recently I found NMI could not be injected to vm via libvirt API Reproduce the problem: 1 use guest of redhat 7.3 2 disable nmi_watchdog and trig spinlock deadlock inside the guest check the running vcpu thread, make sure not vcpu0 3 inject NMI into the guest via libvirt API "