Re: [RFC PATCH v5 092/104] KVM: TDX: Handle TDX PV HLT hypercall

From: Sean Christopherson
Date: Thu Apr 07 2022 - 10:51:30 EST


On Fri, Mar 04, 2022, isaku.yamahata@xxxxxxxxx wrote:
> From: Isaku Yamahata <isaku.yamahata@xxxxxxxxx>
>
> Wire up TDX PV HLT hypercall to the KVM backend function.
>
> When the guest issues HLT, the hypercall instruction can be the right after
> CLI instruction. Atomically unmask virtual interrupt and issue HLT
> hypercall. The virtual interrupts can arrive right after CLI instruction
> before switching back to VMM. In such a case, the VMM should return to the
> guest without losing the interrupt. Check if interrupts arrived before the
> TDX module switching to VMM. And return to the guest in such cases.

Pretty sure you mean STI, not CLI.