diff options
author | Daniel Henrique Barboza <danielhb413@gmail.com> | 2021-03-31 21:04:37 -0300 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2021-04-12 12:27:14 +1000 |
commit | 2b18fc794f312a91482998bae5ea6c8724200e06 (patch) | |
tree | 2759989bfb99703081e8331a79ea1950be148992 /hw/misc | |
parent | d522cb52e604c8448674d90dae09ad50223b5d3c (diff) | |
download | qemu-2b18fc794f312a91482998bae5ea6c8724200e06.zip |
spapr.c: always pulse guest IRQ in spapr_core_unplug_request()
Commit 47c8c915b162 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>
Diffstat (limited to 'hw/misc')
0 files changed, 0 insertions, 0 deletions