Re: [PATCH v5 2/3] KVM: x86/ioapic: Implement support for I/O APIC version 0x20 with EOIR
From: Khushit Shah
Date: Mon Dec 29 2025 - 10:58:07 EST
> On 29 Dec 2025, at 9:06 PM, David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:
>
> Ah, OK. So in the case of in-kernel I/O APIC, kvm_lapic_advertise_suppress_eoi_broadcast() kvm_lapic_respect_suppress_eoi_broadcast() are the same. In that case we can choose the one which is easier to understand and doesn't need the reader to refer back to an earlier commit? I accept your correction; the patch is correct.
>
> But I think I still prefer the check to be on _respect_ as it's clearer that it's part of the new behaviour that is only introduced with this series.
We can't use `_respect_` here because in QUIRKED mode with in-kernel IRQCHIP:
advertise = false (version 0x11 advertised, no EOIR register)
respect = true (legacy quirk: honor SPIV bit even if not advertised)
While it is true that when SEOIB is not advertised, the bit should not
be respected. However, the legacy KVM implementation still respected the
SPIV bit in kvm_ioapic_update_eoi_one() even when not advertising SEOIB.
I've preserved that legacy behavior in `_respect_` for QUIRKED mode.
I think the logic is straightforward: if we advertise SEOIB while using in-kernel
IRQCHIP, use I/O APIC version 0x20.