Re: [PATCH] KVM: x86: Fix lapic timer interrupt lost after loading a snapshot.

From: Sean Christopherson
Date: Tue Sep 12 2023 - 14:14:30 EST


Please send mail as plain text, most of the mailing lists reject HTML, and in
general HTML makes everyone grumpy.

On Tue, Sep 12, 2023, Haitao Shan wrote:
> On Tue, Sep 12, 2023 at 10:07 AM Sean Christopherson <seanjc@xxxxxxxxxx>
> wrote:
>
> > Aha! And I think the new apicv_pre_state_restore() needs to be invoked
> > even if APICv is not active, because I don't see anything that purges the
> > PIR when APICv is enabled. VMX's APICv doesn't have many inhibits that can
> > go away, and I highly doubt userspace will restore into a vCPU with pending
> > posted interrupts, so in practice this is _extremely_ unlikely to be
> > problematic. But it's still wrong.
> >
> Thanks for sharing what you would like to fix the bug. I will write a v2 for
> that. Actually, I am sorry that I forgot to add RFC to the title, as I
> personally did not think the proposed fix looks clean.

No worries, thanks for taking this on!