]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86/xen: remove WARN_ON_ONCE() with false positives in evtchn delivery
authorDavid Woodhouse <dwmw@amazon.co.uk>
Sat, 17 Feb 2024 11:19:21 +0000 (11:19 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Sat, 17 Feb 2024 11:26:06 +0000 (11:26 +0000)
commitcf16684315c1330ebb57beb0a5063070d845f603
treed0d33664782105ccf71ecc5d59159bb2de0b3a27
parent5e6546abc8c4f52e51f097783f1cce77cec718cc
KVM: x86/xen: remove WARN_ON_ONCE() with false positives in evtchn delivery

The kvm_xen_inject_vcpu_vector() function has a comment saying "the fast
version will always work for physical unicast", justifying its use of
kvm_irq_delivery_to_apic_fast() and the WARN_ON_ONCE() when that fails.

In fact that assumption isn't true if X2APIC isn't in use by the guest
and there is (8-bit x)APIC ID aliasing. A single "unicast" destination
APIC ID *may* then be delivered to multiple vCPUs. Remove the warning,
and in fact it might as well just call kvm_irq_delivery_to_apic().

Reported-by: Michal Luczaj <mhal@rbox.co>
Fixes: fde0451be8fb3 ("KVM: x86/xen: Support per-vCPU event channel upcall via local APIC")
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/kvm/xen.c