mirror_qemu/hw/ppc
Harsh Prateek Bora 51da750063 ppc/spapr: Initialize max_cpus limit to SPAPR_IRQ_NR_IPIS.
Initialize the machine specific max_cpus limit as per the maximum range
of CPU IPIs available. Keeping between 4096 to 8192 will throw IRQ not
free error due to XIVE/XICS limitation and keeping beyond 8192 will hit
assert in tcg_region_init or spapr_xive_claim_irq.

Logs:

Without patch fix:

[root@host build]# qemu-system-ppc64 -accel tcg -smp 10,maxcpus=4097
qemu-system-ppc64: IRQ 4096 is not free
[root@host build]#

On LPAR:
[root@host build]# qemu-system-ppc64 -accel tcg -smp 10,maxcpus=8193
**
ERROR:../tcg/region.c:774:tcg_region_init: assertion failed:
(region_size >= 2 * page_size)
Bail out! ERROR:../tcg/region.c:774:tcg_region_init: assertion failed:
(region_size >= 2 * page_size)
Aborted (core dumped)
[root@host build]#

On x86:
[root@host build]# qemu-system-ppc64 -accel tcg -smp 10,maxcpus=8193
qemu-system-ppc64: ../hw/intc/spapr_xive.c:596: spapr_xive_claim_irq:
Assertion `lisn < xive->nr_irqs' failed.
Aborted (core dumped)
[root@host build]#

With patch fix:
[root@host build]# qemu-system-ppc64 -accel tcg -smp 10,maxcpus=4097
qemu-system-ppc64: Invalid SMP CPUs 4097. The max CPUs supported by
machine 'pseries-8.2' is 4096
[root@host build]#

Reported-by: Kowshik Jois <kowsjois@linux.ibm.com>
Tested-by: Kowshik Jois <kowsjois@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
(cherry picked from commit c4f91d7b7b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2024-04-16 21:15:05 +03:00
..
Kconfig hw/ppc: Add emulation of AmigaOne XE board 2023-11-07 15:49:13 -03:00
amigaone.c ppc/amigaone: Allow running AmigaOS without firmware image 2023-11-30 22:13:00 +10:00
e500-ccsr.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
e500.c hw/ppc/e500: Restrict ppce500_init_mpic_kvm() to KVM 2023-11-07 12:13:28 +01:00
e500.h hw/ppc/e500: Add Freescale eSDHC to e500plat 2022-12-21 14:17:55 -03:00
e500plat.c hw/ppc: Use MachineClass->default_nic in the ppc machines 2023-05-22 09:44:22 +02:00
fdt.c target/ppc: Split page size information into a separate allocation 2018-04-27 18:05:22 +10:00
fw_cfg.c hw/ppc: Implement fw_cfg_arch_key_name() 2019-05-23 14:10:31 +02:00
mac_newworld.c hw/ppc: Use MachineClass->default_nic in the ppc machines 2023-05-22 09:44:22 +02:00
mac_oldworld.c hw/ppc: Reset timebase facilities on machine reset 2023-09-06 11:19:33 +02:00
meson.build ppc/pnv: Add an I2C controller model 2023-11-07 15:49:41 -03:00
mpc8544_guts.c ppc/ppc4xx: Convert printfs() 2022-01-04 07:55:34 +01:00
mpc8544ds.c hw/ppc: Use MachineClass->default_nic in the ppc machines 2023-05-22 09:44:22 +02:00
pef.c migration: simplify blockers 2023-10-20 08:51:41 +02:00
pegasos2.c vt82c686 machines: Support machine-default audiodev with fallback 2023-10-03 10:29:40 +02:00
pnv.c ppc/pnv: PNV I2C engines assigned incorrect XSCOM addresses 2023-11-21 08:39:58 +01:00
pnv_bmc.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
pnv_core.c hw/ppc: Reset timebase facilities on machine reset 2023-09-06 11:19:33 +02:00
pnv_homer.c include/hw/ppc: Split pnv_chip.h off pnv.h 2023-01-20 07:25:10 +01:00
pnv_i2c.c ppc/pnv: Fix PNV I2C invalid status after reset 2023-11-21 08:39:58 +01:00
pnv_lpc.c bulk: Remove pointless QOM casts 2023-06-05 20:48:34 +02:00
pnv_occ.c bulk: Remove pointless QOM casts 2023-06-05 20:48:34 +02:00
pnv_pnor.c block: Change blk_{pread,pwrite}() param order 2022-07-12 12:14:56 +02:00
pnv_psi.c pnv/psi: Clean up local variable shadowing 2023-09-29 10:07:17 +02:00
pnv_sbe.c bulk: Remove pointless QOM casts 2023-06-05 20:48:34 +02:00
pnv_xscom.c hw/ppc/pnv_xscom: Do not use SysBus API to map local MMIO region 2023-10-19 23:13:28 +02:00
ppc.c ppc: spelling fixes 2023-09-20 07:54:34 +03:00
ppc4xx_devs.c ppc4xx_sdram: Move ppc4xx_sdram_banks() to ppc4xx_sdram.c 2022-10-28 13:15:23 -03:00
ppc4xx_pci.c ppc4xx_pci: Add define for ppc4xx-host-bridge type name 2023-07-07 04:47:49 -03:00
ppc4xx_sdram.c *: Add missing includes of qemu/error-report.h 2023-03-22 15:06:57 +00:00
ppc405.h ppc4xx_sdram: QOM'ify 2022-10-17 16:15:09 -03:00
ppc405_boards.c ppc4xx_sdram: Rename functions to prevent name clashes 2022-10-17 16:15:09 -03:00
ppc405_uc.c Drop duplicate #include 2023-02-08 07:28:05 +01:00
ppc440.h ppc440: Remove ppc460ex_pcie_init legacy init function 2023-07-07 04:47:49 -03:00
ppc440_bamboo.c ppc/{bamboo, virtex_ml507}: Remove useless dependency on ppc405.h header 2023-10-21 15:00:22 +03:00
ppc440_pcix.c hw/pci-host/ppc440_pcix: Do not expose a bridge device on PCI bus 2024-04-16 17:27:52 +03:00
ppc440_uc.c hw/ppc/ppc440_uc: Remove dead l2sram_update_mappings() 2023-10-21 15:00:22 +03:00
ppc_booke.c Use g_new() & friends where that makes obvious sense 2022-03-21 15:44:44 +01:00
ppce500_spin.c target/ppc: Restrict KVM-specific fields from ArchCPU 2023-06-28 14:27:59 +02:00
prep.c hw/ppc: Support machine-default audiodev with fallback 2023-10-03 10:29:40 +02:00
prep_systemio.c ppc: spelling fixes 2023-09-20 07:54:34 +03:00
rs6000_mc.c Do not include hw/boards.h if it's not really necessary 2021-05-02 17:24:51 +02:00
sam460ex.c ppc440_pcix: Rename QOM type define abd move it to common header 2023-07-07 04:47:49 -03:00
spapr.c ppc/spapr: Initialize max_cpus limit to SPAPR_IRQ_NR_IPIS. 2024-04-16 21:15:05 +03:00
spapr_caps.c spapr: TCG allow up to 8-thread SMT on POWER8 and newer CPUs 2023-06-25 22:41:30 +02:00
spapr_cpu_core.c hw/ppc: Reset timebase facilities on machine reset 2023-09-06 11:19:33 +02:00
spapr_drc.c spapr/drc: Clean up local variable shadowing in prop_get_fdt() 2023-09-29 10:07:18 +02:00
spapr_events.c migration: simplify blockers 2023-10-20 08:51:41 +02:00
spapr_hcall.c ppc: spelling fixes 2023-09-20 07:54:34 +03:00
spapr_iommu.c hw/ppc: use g_free() in spapr_tce_table_post_load() 2023-09-08 13:08:52 +03:00
spapr_irq.c ppc/spapr: Introduce SPAPR_IRQ_NR_IPIS to refer IRQ range for CPU IPIs. 2024-04-16 21:14:52 +03:00
spapr_nested.c ppc/spapr: Move spapr nested HV to a new file 2023-06-25 22:41:30 +02:00
spapr_numa.c spapr: Remove support for NVIDIA V100 GPU with NVLink2 2023-09-18 07:25:28 -03:00
spapr_nvdimm.c migration: Use vmstate_register_any() 2023-11-01 16:13:58 +01:00
spapr_ovec.c spapr: Improve handling of memory unplug with old guests 2021-01-19 10:20:29 +11:00
spapr_pci.c spapr/pci: Correct "does not support hotplugging error messages 2023-11-17 10:07:52 +01:00
spapr_pci_vfio.c vfio/container: Move IBM EEH related functions into spapr_pci_vfio.c 2023-11-06 13:23:23 +01:00
spapr_rng.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
spapr_rtas.c ppc: qtest already exports qtest_rtas_call() 2023-11-07 15:49:41 -03:00
spapr_rtas_ddw.c spapr/ddw: Implement 64bit query extension 2022-07-06 10:22:37 -03:00
spapr_rtc.c rtc: Have event RTC_CHANGE identify the RTC by QOM path 2022-02-28 11:39:35 +01:00
spapr_softmmu.c *: Add missing includes of qemu/error-report.h 2023-03-22 15:06:57 +00:00
spapr_tpm_proxy.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
spapr_vio.c hw/ppc/spapr_vio: Realize SPAPR_VIO_BRIDGE device before accessing it 2023-10-19 23:13:28 +02:00
spapr_vof.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
trace-events ppc4xx_sdram: Generalise bank setup 2022-10-28 13:15:23 -03:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
virtex_ml507.c ppc/{bamboo, virtex_ml507}: Remove useless dependency on ppc405.h header 2023-10-21 15:00:22 +03:00
vof.c ppc/vof: Fix missed fields in VOF cleanup 2023-09-06 11:19:33 +02:00