mirror_qemu/hw
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
..
9pfs migration: simplify blockers 2023-10-20 08:51:41 +02:00
acpi hmat acpi: Fix out of bounds access due to missing use of indirection 2024-03-13 21:52:34 +03:00
adc meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
alpha hw/pci: modify pci_setup_iommu() to set PCIIOMMUOps 2023-11-03 09:20:31 +01:00
arm smmu: Clear SMMUPciBus pointer cache when system reset 2024-02-15 11:13:38 +03:00
audio hw/audio/virtio-snd: Remove unused assignment 2024-04-10 20:32:12 +03:00
avr hw/avr/atmega: Fix wrong initial value of stack pointer 2023-11-28 14:27:12 +01:00
block hw/block/nand: Fix out-of-bound access in NAND block buffer 2024-04-10 20:32:12 +03:00
char hw/char/virtio-serial-bus: Protect from DMA re-entrancy bugs 2024-04-10 20:32:12 +03:00
core hw/nvme: add machine compatibility parameter to enable msix exclusive bar 2024-03-13 20:36:57 +03:00
cpu hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
cris
cxl hw/cxl: Pass CXLComponentState to cache_mem_ops 2024-02-14 21:42:04 +03:00
display hw/display/virtio-gpu: Protect from DMA re-entrancy bugs 2024-04-10 20:32:12 +03:00
dma hw/dma/xlnx_csu_dma: don't throw guest errors when stopping the SRC DMA 2023-11-27 17:02:04 +00:00
gpio hw/gpio/nrf51: implement DETECT signal 2023-08-22 17:30:59 +01:00
hppa hw/hppa/Kconfig: Fix building with "configure --without-default-devices" 2024-02-22 18:45:41 +03:00
hyperv vfio queue: 2023-11-07 09:41:52 +08:00
i2c hw/i2c: pmbus: reset page register for out of range reads 2023-11-07 13:08:49 +01:00
i386 hw/i386: Fix _STA return value for ACPI0017 2024-02-15 11:29:04 +03:00
ide ide/via: Fix BAR4 value in legacy mode 2023-11-28 14:56:32 +01:00
input hw/input/stellaris_gamepad: Free StellarisGamepad::keycodes[] array 2023-11-27 15:27:46 +00:00
intc hw/intc/arm_gicv3: ICC_HPPIR* return SPURIOUS if int group is disabled 2024-04-02 19:45:01 +03:00
ipack meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
ipmi hw/ipmi: Don't call vmstate_register() from instance_init() functions 2023-11-01 16:13:58 +01:00
isa hw/isa/vt82c686: Keep track of PIRQ/PINT pins separately 2024-04-16 17:27:39 +03:00
loongarch hw/acpi: Realize ACPI_GED sysbus device before accessing it 2023-10-19 23:13:28 +02:00
m68k hw/core/machine: Constify MachineClass::valid_cpu_types[] 2023-11-20 15:30:59 +00:00
mem hw/mem/memory-device.c: spelling fix: ontaining 2023-11-15 11:59:54 +03:00
microblaze hw/microblaze: Clean up local variable shadowing 2023-09-29 10:07:16 +02:00
mips hw/mips: LOONGSON3V depends on UNIMP device 2023-11-13 16:56:06 +01:00
misc hw/misc/applesmc: Fix memory leak in reset() handler 2024-04-10 20:32:12 +03:00
net hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum() 2024-04-10 20:32:12 +03:00
nios2 target/nios2: Deprecate the Nios II architecture 2023-11-23 14:10:04 +00:00
nubus trace-events: Fix the name of the tracing.rst file 2023-09-08 13:08:51 +03:00
nvme hw/nvme: Use pcie_sriov_num_vfs() 2024-03-13 21:52:34 +03:00
nvram hw/nvram/xlnx-efuse-ctrl: Free XlnxVersalEFuseCtrl[] "pg0-lock" array 2023-11-27 15:27:45 +00:00
openrisc *: Add missing includes of qemu/error-report.h 2023-03-22 15:06:57 +00:00
pci pcie_sriov: Validate NumVFs 2024-03-13 21:52:34 +03:00
pci-bridge hw/pci-bridge/cxl_downstream: Set default link width and link speed 2023-11-07 03:39:11 -05:00
pci-host pci-host: designware: Limit value range of iATU viewport register 2024-02-09 10:44:49 +03:00
pcmcia hw/pcmcia/pxa2xx: Inline pxa2xx_pcmcia_init() 2023-10-27 12:48:57 +01:00
ppc ppc/spapr: Initialize max_cpus limit to SPAPR_IRQ_NR_IPIS. 2024-04-16 21:15:05 +03:00
rdma hw/rdma/vmw/pvrdma_cmd: Use correct struct in query_port() 2023-10-21 15:00:22 +03:00
remote hw/pci: modify pci_setup_iommu() to set PCIIOMMUOps 2023-11-03 09:20:31 +01:00
riscv target/riscv/kvm: fix timebase-frequency when using KVM acceleration 2024-03-27 13:04:06 +03:00
rtc hw/rtc/sun4v-rtc: Relicense to GPLv2-or-later 2024-03-09 21:42:00 +03:00
rx hw/rx/rx62n: Use qdev_prop_set_array() 2023-11-10 18:19:13 +01:00
s390x s390x/pci: drive ISM reset from subsystem reset 2024-01-22 18:23:48 +03:00
scsi hw/scsi/scsi-generic: Fix io_timeout property not applying 2024-03-27 09:48:06 +03:00
sd hw/sd/sdhci: Do not update TRNMOD when Command Inhibit (DAT) is set 2024-04-10 20:32:12 +03:00
sensor hw/sensor: add ADM1266 device model 2023-11-07 13:08:49 +01:00
sh4 hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
smbios hw/smbios: Fix port connector option validation 2024-02-13 21:06:20 +03:00
sparc other architectures: spelling fixes 2023-07-25 17:14:07 +03:00
sparc64 hw/sparc64/ebus: Access memory regions via pci_address_space_io() 2023-10-19 23:13:28 +02:00
ssi hw/ssi/xilinx_spips: fix an out of bound access 2023-11-27 15:38:43 +00:00
timer migration: Use vmstate_register_any() 2023-11-01 16:13:58 +01:00
tpm hw/tpm: spelling fixes 2023-09-20 07:54:34 +03:00
tricore hw/tricore: Log failing test in testdevice 2023-09-29 08:28:02 +02:00
ufs hw/ufs: avoid generating the same ID string for different LU devices 2023-12-05 13:57:18 +09:00
usb hw/usb/bus.c: PCAP adding 0xA in Windows version 2024-03-01 18:59:21 +03:00
vfio vfio/pci: Clear MSI-X IRQ index always 2024-01-29 23:08:46 +03:00
virtio virtio-pci: fix use of a released vector 2024-04-15 23:44:26 +03:00
watchdog hw/watchdog/wdt_aspeed: Remove unused 'hw/misc/aspeed_scu.h' header 2023-11-15 11:09:17 +03:00
xen xen: Drop out of coroutine context xen_invalidate_map_cache_entry 2024-03-13 20:15:59 +03:00
xenpv hw/xen: update Xen PV NIC to XenDevice model 2023-11-07 08:54:20 +00:00
xtensa trivial: Simplify the spots that use TARGET_BIG_ENDIAN as a numeric value 2023-09-08 13:08:52 +03:00
Kconfig hw/ufs: Initial commit for emulated Universal-Flash-Storage 2023-09-07 14:01:29 -04:00
meson.build hw/ufs: Initial commit for emulated Universal-Flash-Storage 2023-09-07 14:01:29 -04:00