From: Paolo Bonzini <pbonzini@redhat.com>
To: yadong.qi@intel.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, x86@kernel.org
Cc: sean.j.christopherson@intel.com, vkuznets@redhat.com,
wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org,
tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
hpa@zytor.com, liran.alon@oracle.com,
nikita.leshchenko@oracle.com, chao.gao@intel.com,
kevin.tian@intel.com, luhai.chen@intel.com, bing.zhu@intel.com,
kai.z.wang@intel.com
Subject: Re: [PATCH RFC] KVM: x86: emulate wait-for-SIPI and SIPI-VMExit
Date: Thu, 17 Sep 2020 10:56:18 +0200 [thread overview]
Message-ID: <c3eaf796-67f1-9224-3e16-72d93501b6cf@redhat.com> (raw)
In-Reply-To: <20200917022501.369121-1-yadong.qi@intel.com>
On 17/09/20 04:25, yadong.qi@intel.com wrote:
> From: Yadong Qi <yadong.qi@intel.com>
>
> Background: We have a lightweight HV, it needs INIT-VMExit and
> SIPI-VMExit to wake-up APs for guests since it do not monitoring
> the Local APIC. But currently virtual wait-for-SIPI(WFS) state
> is not supported in KVM, so when running on top of KVM, the L1
> HV cannot receive the INIT-VMExit and SIPI-VMExit which cause
> the L2 guest cannot wake up the APs.
>
> This patch is incomplete, it emulated wait-for-SIPI state by halt
> the vCPU and emulated SIPI-VMExit to L1 when trapped SIPI signal
> from L2. I am posting it RFC to gauge whether or not upstream
> KVM is interested in emulating wait-for-SIPI state before
> investing the time to finish the full support.
Yes, the patch makes sense and is a good addition. What exactly is
missing? (Apart from test cases in kvm-unit-tests!)
Paolo
> According to Intel SDM Chapter 25.2 Other Causes of VM Exits,
> SIPIs cause VM exits when a logical processor is in
> wait-for-SIPI state.
>
> In this patch:
> 1. introduce SIPI exit reason,
> 2. introduce wait-for-SIPI state for nVMX,
> 3. advertise wait-for-SIPI support to guest.
>
> When L1 hypervisor is not monitoring Local APIC, L0 need to emulate
> INIT-VMExit and SIPI-VMExit to L1 to emulate INIT-SIPI-SIPI for
> L2. L2 LAPIC write would be traped by L0 Hypervisor(KVM), L0 should
> emulate the INIT/SIPI vmexit to L1 hypervisor to set proper state
> for L2's vcpu state.
next prev parent reply other threads:[~2020-09-17 8:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-17 2:25 yadong.qi
2020-09-17 8:56 ` Paolo Bonzini [this message]
2020-09-17 15:02 ` Sean Christopherson
2020-09-18 2:01 ` Qi, Yadong
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=c3eaf796-67f1-9224-3e16-72d93501b6cf@redhat.com \
--to=pbonzini@redhat.com \
--cc=bing.zhu@intel.com \
--cc=bp@alien8.de \
--cc=chao.gao@intel.com \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kai.z.wang@intel.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liran.alon@oracle.com \
--cc=luhai.chen@intel.com \
--cc=mingo@redhat.com \
--cc=nikita.leshchenko@oracle.com \
--cc=sean.j.christopherson@intel.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
--cc=yadong.qi@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
all inboxes | Powered by JetHome®