tmp_suning_uos_patched/arch/powerpc
Cédric Le Goater ea947267eb powerpc/xive: Discard disabled interrupts in get_irqchip_state()
commit 6f779e1d359b8d5801f677c1d49dcfa10bf95674 upstream.

When an interrupt is passed through, the KVM XIVE device calls the
set_vcpu_affinity() handler which raises the P bit to mask the
interrupt and to catch any in-flight interrupts while routing the
interrupt to the guest.

On the guest side, drivers (like some Intels) can request at probe
time some MSIs and call synchronize_irq() to check that there are no
in flight interrupts. This will call the XIVE get_irqchip_state()
handler which will always return true as the interrupt P bit has been
set on the host side and lock the CPU in an infinite loop.

Fix that by discarding disabled interrupts in get_irqchip_state().

Fixes: da15c03b04 ("powerpc/xive: Implement get_irqchip_state method for XIVE to fix shutdown race")
Cc: stable@vger.kernel.org #v5.4+
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Tested-by: seeteena <s1seetee@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211011070203.99726-1-clg@kaod.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-20 11:45:01 +02:00
..
boot powerpc/fsl/dts: Fix phy-connection-type for fm1mac3 2021-10-13 10:04:26 +02:00
configs powerpc/config: Renable MTD_PHYSMAP_OF 2021-09-18 13:40:14 +02:00
crypto
include KVM: PPC: Book3S HV Nested: Reflect guest PMU in-use to L0 when guest SPRs are live 2021-09-18 13:40:15 +02:00
kernel powerpc/64s: fix program check interrupt emergency stack path 2021-10-13 10:04:30 +02:00
kexec powerpc/kexec_file: Use current CPU info while setting up FDT 2021-05-11 14:47:35 +02:00
kvm KVM: PPC: Book3S HV: Tolerate treclaim. in fake-suspend mode changing registers 2021-09-22 12:27:59 +02:00
lib powerpc/64s: Fix crashes when toggling entry flush barrier 2021-05-19 10:13:10 +02:00
math-emu
mm powerpc/numa: Consider the max NUMA node for migratable LPAR 2021-09-18 13:40:14 +02:00
net powerpc/bpf: Fix BPF_SUB when imm == 0x80000000 2021-10-13 10:04:30 +02:00
oprofile
perf powerpc/perf/hv-gpci: Fix counter value parsing 2021-09-18 13:40:06 +02:00
platforms pseries/eeh: Fix the kdump kernel crash during eeh_pseries_init 2021-10-13 10:04:30 +02:00
purgatory
sysdev powerpc/xive: Discard disabled interrupts in get_irqchip_state() 2021-10-20 11:45:01 +02:00
tools
xmon powerpc/xmon: Change printk() to pr_cont() 2020-12-30 11:54:16 +01:00
Kbuild
Kconfig powerpc: Fix HAVE_HARDLOCKUP_DETECTOR_ARCH build configuration 2021-05-14 09:50:31 +02:00
Kconfig.debug powerpc: iommu: fix build when neither PCI or IBMVIO is set 2021-05-14 09:50:34 +02:00
Makefile Kbuild fixes for v5.10 (2nd) 2020-12-06 10:31:39 -08:00
Makefile.postlink