linux-brain/arch/powerpc/sysdev
Cédric Le Goater d1de05f20c powerpc/xive: Use XIVE_BAD_IRQ instead of zero to catch non configured IPIs
commit b1a504a6500df50e83b701b7946b34fce27ad8a3 upstream.

When a CPU is brought up, an IPI number is allocated and recorded
under the XIVE CPU structure. Invalid IPI numbers are tracked with
interrupt number 0x0.

On the PowerNV platform, the interrupt number space starts at 0x10 and
this works fine. However, on the sPAPR platform, it is possible to
allocate the interrupt number 0x0 and this raises an issue when CPU 0
is unplugged. The XIVE spapr driver tracks allocated interrupt numbers
in a bitmask and it is not correctly updated when interrupt number 0x0
is freed. It stays allocated and it is then impossible to reallocate.

Fix by using the XIVE_BAD_IRQ value instead of zero on both platforms.

Reported-by: David Gibson <david@gibson.dropbear.id.au>
Fixes: eac1e731b5 ("powerpc/xive: guest exploitation of the XIVE interrupt controller")
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Tested-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200306150143.5551-2-clg@kaod.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-17 10:48:53 +02:00
..
ge License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xics KVM: PPC: Book3S HV: use smp_mb() when setting/clearing host_ipi flag 2020-01-09 10:19:08 +01:00
xive powerpc/xive: Use XIVE_BAD_IRQ instead of zero to catch non configured IPIs 2020-04-17 10:48:53 +02:00
6xx-suspend.S powerpc: Use CURRENT_THREAD_INFO instead of open coded assembly 2012-07-11 14:18:22 +10:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile powerpc/Makefiles: Convert ifeq to ifdef where possible 2018-08-08 00:32:36 +10:00
cpm1.c powerpc: remove unnecessary inclusion of asm/tlbflush.h 2018-07-30 22:48:20 +10:00
cpm2.c powerpc/sysdev: change CPM GPIO to platform_device 2018-01-20 23:29:02 -06:00
cpm2_pic.c powerpc/cpm2: Use irq_set_handler_locked() 2015-09-16 15:43:10 +02:00
cpm2_pic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpm_common.c powerpc/cpm1: fix compilation error with CONFIG_PPC_EARLY_DEBUG_CPM 2018-08-10 22:12:33 +10:00
cpm_gpio.c powerpc: cpm_gpio: Remove owner assignment from platform_driver 2018-06-03 20:43:35 +10:00
dart.h
dart_iommu.c headers: untangle kmemleak.h from mm.h 2018-04-05 21:36:27 -07:00
dcr-low.S ppc: move exports to definitions 2016-08-07 23:50:09 -04:00
dcr.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
ehv_pic.c powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
fsl_85xx_cache_ctlr.h powerpc/85xx: Fix sram_offset parameter type 2012-07-26 13:24:32 -05:00
fsl_85xx_cache_sram.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
fsl_85xx_l2ctlr.c powerpc/85xx: Don't report SRAM to L2 cache fallback as error 2016-07-08 19:55:34 -05:00
fsl_gtm.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
fsl_lbc.c powerpc/fsl-lbc: use DEFINE_SPINLOCK() 2016-12-09 23:08:40 -06:00
fsl_mpic_err.c powerpc/mpic: Pass first free vector number to mpic_setup_error_int() 2018-07-19 21:58:09 +10:00
fsl_mpic_timer_wakeup.c powerpc/mpic_timer: avoid struct timeval 2018-01-21 15:06:16 +11:00
fsl_msi.c kernel/irq: Extend lockdep class for request mutex 2017-12-28 12:26:35 +01:00
fsl_msi.h powerpc/85xx: workaround for chips with MSI hardware errata 2015-03-23 19:51:18 -05:00
fsl_pci.c powerpc updates for 4.16 2018-02-02 10:01:04 -08:00
fsl_pci.h EDAC, mpc85xx: Make mpc85xx-pci-edac a platform device 2015-12-11 16:56:16 +01:00
fsl_pmc.c powerpc/fsl_pmc: use builtin_platform_driver 2016-12-04 19:51:44 -06:00
fsl_rcpm.c powerpc/rcpm: Fix build break when SMP=n 2016-03-16 15:22:32 +11:00
fsl_rio.c rapidio: remove global irq spinlocks from the subsystem 2017-10-03 17:54:24 -07:00
fsl_rio.h rapidio: add global inbound port write interfaces 2016-03-22 15:36:02 -07:00
fsl_rmu.c rapidio: remove global irq spinlocks from the subsystem 2017-10-03 17:54:24 -07:00
fsl_soc.c powerpc/cpm1: link to CONFIG_CPM1 instead of CONFIG_8xx 2017-08-10 23:32:05 +10:00
fsl_soc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
grackle.c powerpc: rename ppc_pci_*_flags to pci_*_flags 2011-07-12 09:28:04 -05:00
i8259.c powerpc: Set I/O port resource types correctly 2017-12-18 23:07:45 -06:00
indirect_pci.c powerpc/fsl_pci: Fix pci stack build bug with FRAME_WARN 2015-01-29 19:56:15 -06:00
ipic.c powerpc/ipic: Fix status get and status clear 2017-11-06 16:48:13 +11:00
ipic.h irq_domain/powerpc: Use common irq_domain structure instead of irq_host 2012-02-14 14:06:50 -07:00
micropatch.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmio_nvram.c powerpc/sparse: Make a bunch of things static 2016-09-13 17:35:47 +10:00
mpc5xxx_clocks.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpic.c powerpc/mpic: Pass first free vector number to mpic_setup_error_int() 2018-07-19 21:58:09 +10:00
mpic.h powerpc/pasemi: Only the build the pasemi MSI code for PASEMI=y 2015-05-11 19:55:25 +10:00
mpic_msgr.c powerpc: Fix size calculation using resource_size() 2018-08-10 22:12:33 +10:00
mpic_msi.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
mpic_timer.c powerpc/mpic_timer: avoid struct timeval 2018-01-21 15:06:16 +11:00
mpic_u3msi.c powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
msi_bitmap.c powerpc/msi: Remove VLA usage 2018-07-04 22:41:09 +10:00
of_rtc.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
pmi.c powerpc: Remove all usages of NO_IRQ 2016-09-20 20:57:12 +10:00
rtc_cmos_setup.c PTR_RET is now PTR_ERR_OR_ZERO(): Replace most. 2013-07-15 11:25:01 +09:30
scom.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
simple_gpio.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
simple_gpio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tsi108_dev.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
tsi108_pci.c powerpc: Convert to using %pOF instead of full_name 2017-08-23 22:27:04 +10:00
udbg_memcons.c powerpc: Delete non-required instances of include <linux/init.h> 2014-01-15 13:46:44 +11:00
xilinx_intc.c powerpc/virtex: Use generic xilinx irqchip driver 2016-11-29 09:14:50 +00:00
xilinx_pci.c powerpc: make of_device_ids const 2014-09-25 23:14:46 +10:00