[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200917150217.GA13522@sjchrist-ice>
Date: Thu, 17 Sep 2020 08:02:17 -0700
From: Sean Christopherson <sean.j.christopherson@...el.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: yadong.qi@...el.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, x86@...nel.org, vkuznets@...hat.com,
wanpengli@...cent.com, jmattson@...gle.com, joro@...tes.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
liran.alon@...cle.com, nikita.leshchenko@...cle.com,
chao.gao@...el.com, kevin.tian@...el.com, luhai.chen@...el.com,
bing.zhu@...el.com, kai.z.wang@...el.com
Subject: Re: [PATCH RFC] KVM: x86: emulate wait-for-SIPI and SIPI-VMExit
On Thu, Sep 17, 2020 at 10:56:18AM +0200, Paolo Bonzini wrote:
> On 17/09/20 04:25, yadong.qi@...el.com wrote:
> > From: Yadong Qi <yadong.qi@...el.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!)
nested_vmx_run() puts the vCPU into KVM_MP_STATE_HALTED instead of properly
transitioning to INIT_RECEIVED, e.g. events that arrive while the vCPU is
supposed to be in WFS will be incorrectly recognized. I suspect there are
other gotchas lurking, but that's the big one.
Powered by blists - more mailing lists