Re: [RFC PATCH v5 092/104] KVM: TDX: Handle TDX PV HLT hypercall
From: Sean Christopherson
Date: Thu Apr 14 2022 - 13:13:52 EST
On Mon, Apr 11, 2022, Paolo Bonzini wrote:
> On 4/8/22 16:51, Sean Christopherson wrote:
> > > It also documents how it has to be used. So this looks more or less okay,
> > > just rename "vmxip" to "interrupt_pending_delivery".
> >
> > If we're keeping the call back into SEAM, then this belongs in the path of
> > apic_has_interrupt_for_ppr(), not in the HLT-exit path. To avoid multiple SEAMCALLS
> > in a single exit, VCPU_EXREG_RVI can be added.
>
> But apic_has_interrupt_for_ppr takes a PPR argument and that is not
> available.
>
> So I suppose you mean kvm_apic_has_interrupt?
Yeah, I realized that when I actually tried to implement my idea in code :-)
My hopefully-fully-thought-out idea for handling this:
https://lore.kernel.org/all/YlBhuWElVRwYrrS+@xxxxxxxxxx
https://lore.kernel.org/all/YlBkiOmTGk8VlWFh@xxxxxxxxxx