Re: [PATCH 00/16] KVM: TDX: TDX interrupts

From: Binbin Wu
Date: Wed Jan 08 2025 - 21:44:25 EST





On 1/7/2025 4:08 AM, Sean Christopherson wrote:
On Mon, Jan 06, 2025, Xiaoyao Li wrote:
On 12/9/2024 9:07 AM, Binbin Wu wrote:
Hi,

This patch series introduces the support of interrupt handling for TDX
guests, including virtual interrupt injection and VM-Exits caused by
vectored events.

(I'm not sure if it is the correct place to raise the discussion on
KVM_SET_LAPIC and KVM_SET_LAPIC for TDX. But it seems the most related
series)

Should KVM reject KVM_GET_LAPIC and KVM_SET_LAPIC for TDX?
Yes, IIRC that was what Paolo suggested in one of the many PUCK calls. Until
KVM supports intra-host migration for TDX guests, getting and setting APIC state
is nonsensical.

By rejecting KVM_GET_LAPIC/KVM_SET_LAPIC for TDX guests (i.e.,
guest_apic_protected), I think it should return an error code instead of
returning 0.
Then it requires modifications in QEMU TDX support code to avoid requesting
KVM_GET_LAPIC/KVM_SET_LAPIC.