]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86/xen: Fix SCHEDOP_poll fidelity with Xen schedop_poll
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 16 Jul 2025 09:29:32 +0000 (10:29 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 31 Jul 2025 11:13:01 +0000 (12:13 +0100)
commit9c84a8fc0ca20ce070e08a500b987968b4f902f5
tree3d1882fed6397c2d7cf8f3a86c87b927673aae87
parent038d61fd642278bab63ee8ef722c50d10ab01e8f
KVM: x86/xen: Fix SCHEDOP_poll fidelity with Xen

There were two (probably unimportant, given that we've run a billion or
two Xen guests on this now without noticing except by code inspection)
ways in which the KVM implementation of SCHEDOP_poll differs from Xen:

 1. Xen allows a vCPU to poll a port which is targeted at another vCPU.
 2. Xen explicitly wakes a polling vCPU even when the event is unmasked.

I can't imagine why the first would ever be used, but the second could
theoretically be important. KVM currently wouldn't actually deliver an
interrupt to the target vCPU if another port was already pending, but
if the poll was being used to handle spinlock contention inside another
interrupt handler, the wakeup might never happen and lead to a deadlock.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/kvm/xen.c