From: Paolo Bonzini <pbonzini@redhat.com>
To: Wincy Van <fanwenyi0529@gmail.com>
Cc: "gleb@kernel.org" <gleb@kernel.org>,
"Zhang, Yang Z" <yang.z.zhang@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Wanpeng Li <wanpeng.li@linux.intel.com>,
Jan Kiszka <jan.kiszka@web.de>
Subject: Re: [PATCH v4 6/6] KVM: nVMX: Enable nested posted interrupt processing
Date: Mon, 02 Feb 2015 17:14:04 +0100 [thread overview]
Message-ID: <54CFA24C.4080806@redhat.com> (raw)
In-Reply-To: <CACzj_yUF+GHZ9Y0wc=6On2G+L0+B7g1VHybcXjwHpzxfo9ZzTA@mail.gmail.com>
On 02/02/2015 16:33, Wincy Van wrote:
> static void vmx_accomp_nested_posted_intr(struct kvm_vcpu *vcpu)
> {
> struct vcpu_vmx *vmx = to_vmx(vcpu);
>
> if (is_guest_mode(vcpu) &&
> vmx->nested.posted_intr_nv != -1 &&
> pi_test_on(vmx->nested.pi_desc))
> kvm_apic_set_irr(vcpu,
> vmx->nested.posted_intr_nv);
> }
>
> Then we will get an nested-vmexit in vmx_check_nested_events, that
> posted intr will be handled by L1 immediately.
> This mechanism will also emulate the hardware's behavior: If a posted
> intr was not accomplished by hardware, we will get an interrupt with
> POSTED_INTR_NV.
Yes.
> Would this be better?
I think you do not even need a new bit. You can use KVM_REQ_EVENT and
(to complete my suggestion, which was not enough) do the above in
vmx_check_nested_events.
Paolo
next prev parent reply other threads:[~2015-02-02 16:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 16:02 [PATCH v4 6/6] KVM: nVMX: Enable nested posted interrupt processing Wincy Van
2015-02-02 11:03 ` Paolo Bonzini
2015-02-02 15:33 ` Wincy Van
2015-02-02 16:14 ` Paolo Bonzini [this message]
2015-02-03 1:21 ` Zhang, Yang Z
2015-02-03 3:32 ` Wincy Van
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=54CFA24C.4080806@redhat.com \
--to=pbonzini@redhat.com \
--cc=fanwenyi0529@gmail.com \
--cc=gleb@kernel.org \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wanpeng.li@linux.intel.com \
--cc=yang.z.zhang@intel.com \
/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