Messages in this thread | | | Date | Fri, 15 Apr 2022 16:20:09 +0200 | Subject | Re: [RFC PATCH v5 075/104] KVM: x86: Check for pending APICv interrupt in kvm_vcpu_has_events() | From | Paolo Bonzini <> |
| |
On 4/8/22 18:24, Sean Christopherson wrote: >> Return true for kvm_vcpu_has_events() if the vCPU has a pending APICv >> interrupt to support TDX's usage of APICv. Unlike VMX, TDX doesn't have >> access to vmcs.GUEST_INTR_STATUS and so can't emulate posted interrupts, > Based on the discussion in the HLT patch, this is no longer true. >
It's still true, it only has access to RVI > PPR (which is enough to check if the vCPU is runnable).
> Rather than hook this path, I would rather we tag kvm_apic has having some of its > state protected. Then kvm_cpu_has_interrupt() can invoke the alternative, > protected-apic-only hook when appropriate, and kvm_apic_has_interrupt() can bail > immediately instead of doing useless processing of stale vAPIC state.
Agreed, this is similar to my suggestion on the HLT patch:
https://lkml.kernel.org/r/a7d28775-2dbe-7d97-7053-e182bd5be51c@redhat.com
Paolo
| |