KVM: PPC: Book3S HV: XIVE: Resend re-routed interrupts on CPU priority change
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 10 May 2018 03:06:42 +0000 (13:06 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 17 May 2018 05:17:06 +0000 (15:17 +1000)
commit9dc81d6b0f1e3c40bdf97671dd26a24f128e1182
tree7582e7317a7947d1ea5eeddfd39538c30919877a
parent7e3d9a1d0f2c681456a2e04b8ba9a2fb448fe515
KVM: PPC: Book3S HV: XIVE: Resend re-routed interrupts on CPU priority change

When a vcpu priority (CPPR) is set to a lower value (masking more
interrupts), we stop processing interrupts already in the queue
for the priorities that have now been masked.

If those interrupts were previously re-routed to a different
CPU, they might still be stuck until the older one that has
them in its queue processes them. In the case of guest CPU
unplug, that can be never.

To address that without creating additional overhead for
the normal interrupt processing path, this changes H_CPPR
handling so that when such a priority change occurs, we
scan the interrupt queue for that vCPU, and for any
interrupt in there that has been re-routed, we replace it
with a dummy and force a re-trigger.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_xive_template.c