linux/arch/powerpc
Paul Mackerras 1f80ba3d20 KVM: PPC: Book3S HV: Fix XICS-on-XIVE H_IPI when priority = 0
This fixes a bug in the XICS emulation on POWER9 machines which is
triggered by the guest doing a H_IPI with priority = 0 (the highest
priority).  What happens is that the notification interrupt arrives
at the destination at priority zero.  The loop in scan_interrupts()
sees that a priority 0 interrupt is pending, but because xc->mfrr is
zero, we break out of the loop before taking the notification
interrupt out of the queue and EOI-ing it.  (This doesn't happen
when xc->mfrr != 0; in that case we process the priority-0 notification
interrupt on the first iteration of the loop, and then break out of
a subsequent iteration of the loop with hirq == XICS_IPI.)

To fix this, we move the prio >= xc->mfrr check down to near the end
of the loop.  However, there are then some other things that need to
be adjusted.  Since we are potentially handling the notification
interrupt and also delivering an IPI to the guest in the same loop
iteration, we need to update pending and handle any q->pending_count
value before the xc->mfrr check, rather than at the end of the loop.
Also, we need to update the queue pointers when we have processed and
EOI-ed the notification interrupt, since we may not do it later.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2019-04-30 19:29:23 +10:00
..
boot Kbuild updates for v5.1 2019-03-10 17:48:21 -07:00
configs powerpc fixes for 5.1 #2 2019-03-16 10:45:17 -07:00
crypto
include KVM: PPC: Book3S: Allocate guest TCEs on demand too 2019-04-30 14:43:13 +10:00
kernel powerpc/security: Fix spectre_v2 reporting 2019-03-21 21:09:03 +11:00
kvm KVM: PPC: Book3S HV: Fix XICS-on-XIVE H_IPI when priority = 0 2019-04-30 19:29:23 +10:00
lib treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
math-emu powerpc: math-emu: remove unneeded header search paths 2019-01-14 20:39:27 +11:00
mm powerpc/6xx: fix setup and use of SPRN_SPRG_PGDIR for hash32 2019-03-19 00:30:19 +11:00
net powerpc updates for 5.1 2019-03-07 12:56:26 -08:00
oprofile
perf powerpc updates for 5.1 2019-03-07 12:56:26 -08:00
platforms device-dax for 5.1 2019-03-16 13:05:32 -07:00
purgatory
sysdev treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
tools
xmon powerpc/xmon: Fix opcode being uninitialized in print_insn_powerpc 2019-02-26 23:55:22 +11:00
Kbuild
Kconfig DMA mapping updates for 5.1 2019-03-10 11:54:48 -07:00
Kconfig.debug powerpc: Move page table dump files in a dedicated subdirectory 2019-02-22 22:29:22 +11:00
Makefile powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU 2019-02-23 22:31:40 +11:00
Makefile.postlink