Re: [PATCH v4 12/17] svm: Temporary deactivate AVIC during ExtINT handling

From: Paolo Bonzini
Date: Sat Nov 02 2019 - 06:01:18 EST


On 01/11/19 23:41, Suthikulpanit, Suravee wrote:
> + /*
> + * IRQ window is not needed when AVIC is enabled,
> + * unless we have pending ExtINT since it cannot be injected
> + * via AVIC. In such case, we need to temporarily disable AVIC,
> + * and fallback to injecting IRQ via V_IRQ.
> + */
> + if (kvm_vcpu_apicv_active(vcpu))
> + svm_request_update_avic(vcpu, false);

This must be pretty heavy-weight on SMP VMs, even if most ExtINT guests
do not need SMP in the guest. One alternative is to enable/disable
APICv when LVT or IOAPIC registers are written with ExtINT mode. Not a
blocker, just an idea to consider.

Paolo