From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Zhuangyanying <ann.zhuangyanying@huawei.com>
Cc: pbonzini@redhat.com, herongguang.he@huawei.com,
qemu-devel@nongnu.org, arei.gonglei@huawei.com,
oscar.zhangbo@huawei.com, kvm@vger.kernel.org
Subject: Re: [PATCH] Fix nmi injection failure when vcpu got blocked
Date: Wed, 24 May 2017 16:34:19 +0200 [thread overview]
Message-ID: <20170524143418.GA7778@potion> (raw)
In-Reply-To: <1495604922-4496-1-git-send-email-ann.zhuangyanying@huawei.com>
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)
> 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)'.
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.
next prev parent reply other threads:[~2017-05-24 14:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 5:48 [PATCH] Fix nmi injection failure when vcpu got blocked Zhuangyanying
2017-05-24 14:34 ` Radim Krčmář [this message]
2017-05-25 6:50 ` Zhuangyanying
2017-05-25 14:12 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170524143418.GA7778@potion \
--to=rkrcmar@redhat.com \
--cc=ann.zhuangyanying@huawei.com \
--cc=arei.gonglei@huawei.com \
--cc=herongguang.he@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=oscar.zhangbo@huawei.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox