qemu-e2k/hw/ppc
Daniel Henrique Barboza 2b18fc794f spapr.c: always pulse guest IRQ in spapr_core_unplug_request()
Commit 47c8c915b1 fixed a problem where multiple spapr_drc_detach()
requests were breaking QEMU. The solution was to just spapr_drc_detach()
once, and use spapr_drc_unplug_requested() to filter whether we already
detached it or not. The commit also tied the hotplug request to the
guest in the same condition.

Turns out that there is a reliable way for a CPU hotunplug to fail. If a
guest with one CPU hotplugs a CPU1, then offline CPU0s via 'echo 0 >
/sys/devices/system/cpu/cpu0/online', then attempts to hotunplug CPU1,
the kernel will refuse it because it's the last online CPU of the
system. Given that we're pulsing the IRQ only in the first try, in a
failed attempt, all other CPU1 hotunplug attempts will fail, regardless
of the online state of CPU1 in the kernel, because we're simply not
letting the guest know that we want to hotunplug the device.

Let's move spapr_hotplug_req_remove_by_index() back out of the "if
(!spapr_drc_unplug_requested(drc))" conditional, allowing for multiple
'device_del' requests to the same CPU core to reach the guest, in case
the CPU core didn't fully hotunplugged previously.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20210401000437.131140-3-danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-04-12 12:27:14 +10:00
..
e500-ccsr.h
e500.c hw/ppc: e500: Add missing #address-cells and #size-cells in the eTSEC node 2021-03-31 11:10:50 +11:00
e500.h
e500plat.c hw/ppc/e500plat: Only try to add valid dynamic sysbus devices to platform bus 2021-04-06 11:49:14 +01:00
fdt.c
fw_cfg.c
Kconfig Revert "ppc4xx: Move common dependency on serial to common option" 2021-01-19 10:20:29 +11:00
mac_newworld.c hw/ide: remove 'ide-drive' device 2021-03-18 09:22:55 +00:00
mac_oldworld.c hw/ide: remove 'ide-drive' device 2021-03-18 09:22:55 +00:00
mac.h
meson.build spapr: Add PEF based confidential guest support 2021-02-08 16:57:38 +11:00
mpc8544_guts.c
mpc8544ds.c
pef.c spapr: PEF: prevent migration 2021-02-08 16:57:38 +11:00
pnv_bmc.c Various spelling fixes 2021-03-09 21:19:10 +01:00
pnv_core.c
pnv_homer.c
pnv_lpc.c ppc/pnv: Introduce a LPC FW memory region attribute to map the PNOR 2021-02-10 10:43:50 +11:00
pnv_occ.c
pnv_pnor.c block: Separate blk_is_writable() and blk_supports_write_perm() 2021-01-27 20:45:20 +01:00
pnv_psi.c
pnv_xscom.c exec/memory: Use struct Object typedef 2021-03-09 21:53:57 +01:00
pnv.c ppc/pnv: Set default RAM size to 1 GB 2021-02-10 14:50:11 +11:00
ppc4xx_devs.c hw/ppc: Remove unused ppcuic_init() 2021-01-19 10:20:29 +11:00
ppc4xx_pci.c hw: Use the PCI_SLOT() macro from 'hw/pci/pci.h' 2021-01-04 23:24:44 +01:00
ppc405_boards.c hw/ppc/ppc405_uc: Drop use of ppcuic_init() 2021-01-19 10:20:29 +11:00
ppc405_uc.c hw/ppc/ppc405_uc: Drop use of ppcuic_init() 2021-01-19 10:20:29 +11:00
ppc405.h hw/ppc/ppc405_uc: Drop use of ppcuic_init() 2021-01-19 10:20:29 +11:00
ppc440_bamboo.c qtest: delete superfluous inclusions of qtest.h 2021-03-09 06:03:53 +01:00
ppc440_pcix.c ppc440_pcix: Fix up pci config access 2021-01-06 11:09:59 +11:00
ppc440_uc.c
ppc440.h
ppc_booke.c sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
ppc.c sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
ppce500_spin.c
prep_systemio.c prep: add ppc-parity write method 2021-02-08 15:15:32 +01:00
prep.c qtest: delete superfluous inclusions of qtest.h 2021-03-09 06:03:53 +01:00
rs6000_mc.c
sam460ex.c qtest: delete superfluous inclusions of qtest.h 2021-03-09 06:03:53 +01:00
spapr_caps.c qtest: delete superfluous inclusions of qtest.h 2021-03-09 06:03:53 +01:00
spapr_cpu_core.c spapr_cpu_core.c: use g_auto* in spapr_create_vcpu() 2021-01-19 10:20:29 +11:00
spapr_drc.c spapr: rollback 'unplug timeout' for CPU hotunplugs 2021-04-12 12:27:14 +10:00
spapr_events.c spapr: Improve handling of memory unplug with old guests 2021-01-19 10:20:29 +11:00
spapr_hcall.c spapr_hcall.c: make do_client_architecture_support static 2021-01-19 10:20:29 +11:00
spapr_iommu.c spapr_iommu: Fix vhost integration regression 2021-03-16 10:06:44 -06:00
spapr_irq.c
spapr_numa.c spapr_numa.c: fix ibm,max-associativity-domains calculation 2021-02-10 10:43:50 +11:00
spapr_nvdimm.c ppc/spapr: cleanup -machine pseries,nvdimm=X handling 2020-12-15 12:51:53 -05:00
spapr_ovec.c spapr: Improve handling of memory unplug with old guests 2021-01-19 10:20:29 +11:00
spapr_pci_nvlink2.c
spapr_pci_vfio.c qtest: delete superfluous inclusions of qtest.h 2021-03-09 06:03:53 +01:00
spapr_pci.c spapr_pci.c: add 'unplug already in progress' message for PCI unplug 2021-03-10 09:07:09 +11:00
spapr_rng.c
spapr_rtas_ddw.c
spapr_rtas.c spapr_rtas.c: fix identation of rtas_ibm_suspend_me() args 2021-01-19 10:20:29 +11:00
spapr_rtc.c
spapr_tpm_proxy.c
spapr_vio.c qtest: delete superfluous inclusions of qtest.h 2021-03-09 06:03:53 +01:00
spapr.c spapr.c: always pulse guest IRQ in spapr_core_unplug_request() 2021-04-12 12:27:14 +10:00
trace-events spapr: rename spapr_drc_detach() to spapr_drc_unplug_request() 2021-03-10 09:07:08 +11:00
trace.h
virtex_ml507.c qtest: delete superfluous inclusions of qtest.h 2021-03-09 06:03:53 +01:00