On Sun, Dec 8, 2024 at 5:12 PM Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx> wrote:This callback is called by kvm_lapic_reset() and kvm_apic_set_state().
From: Isaku Yamahata <isaku.yamahata@xxxxxxxxx>Should this be a nop for TDX VMs? pre_state_restore could cause
...
+}
+
static void vt_apicv_pre_state_restore(struct kvm_vcpu *vcpu)
{
struct pi_desc *pi = vcpu_to_pi_desc(vcpu);
@@ -236,6 +245,22 @@ static void vt_apicv_pre_state_restore(struct kvm_vcpu *vcpu)
memset(pi->pir, 0, sizeof(pi->pir));
pending PIRs to get cleared as KVM doesn't have ability to sync them
to vIRR in absence of access to the VAPIC page.
}
+static void vt_hwapic_irr_update(struct kvm_vcpu *vcpu, int max_irr)
+{
+ if (is_td_vcpu(vcpu))
+ return;
+
+ return vmx_hwapic_irr_update(vcpu, max_irr);
+}
+