qemu-e2k/util
Daniel Henrique Barboza d522cb52e6 spapr: rollback 'unplug timeout' for CPU hotunplugs
The pseries machines introduced the concept of 'unplug timeout' for CPU
hotunplugs. The idea was to circunvent a deficiency in the pSeries
specification (PAPR), that currently does not define a proper way for
the hotunplug to fail. If the guest refuses to release the CPU (see [1]
for an example) there is no way for QEMU to detect the failure.

Further discussions about how to send a QAPI event to inform about the
hotunplug timeout [2] exposed problems that weren't predicted back when
the idea was developed. Other QEMU machines don't have any type of
hotunplug timeout mechanism for any device, e.g. ACPI based machines
have a way to make hotunplug errors visible to the hypervisor. This
would make this timeout mechanism exclusive to pSeries, which is not
ideal.

The real problem is that a QAPI event that reports hotunplug timeouts
puts the management layer (namely Libvirt) in a weird spot. We're not
telling that the hotunplug failed, because we can't be 100% sure of
that, and yet we're resetting the unplug state back, preventing any
DEVICE_DEL events to reach out in case the guest decides to release the
device. Libvirt would need to inspect the guest itself to see if the
device was released or not, otherwise the internal domain states will be
inconsistent.  Moreover, Libvirt already has an 'unplug timeout'
concept, and a QEMU side timeout would need to be juggled together with
the existing Libvirt timeout.

All this considered, this solution ended up creating more trouble than
it solved. This patch reverts the 3 commits that introduced the timeout
mechanism for CPU hotplugs in pSeries machines.

This reverts commit 4515a5f786
"qemu_timer.c: add timer_deadline_ms() helper"

This reverts commit d1c2e3ce3d
"spapr_drc.c: add hotunplug timeout for CPUs"

This reverts commit 51254ffb32
"spapr_drc.c: introduce unplug_timeout_timer"

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1911414
[2] https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg04682.html

CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20210401000437.131140-2-danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-04-12 12:27:14 +10:00
..
aio-posix.c
aio-posix.h
aio-wait.c
aio-win32.c
aiocb.c
async.c
atomic64.c
base64.c
bitmap.c
bitops.c
block-helpers.c
block-helpers.h
buffer.c
bufferiszero.c
cacheflush.c util/cacheflush: Fix error generated by clang 2021-01-21 13:00:41 +01:00
cacheinfo.c util: Enhance flush_icache_range with separate data pointer 2021-01-07 05:09:41 -10:00
compatfd.c util/compatfd.c: Fixed style issues 2021-04-01 14:28:39 +02:00
coroutine-sigaltstack.c coroutine-sigaltstack: Add SIGUSR2 mutex 2021-01-26 14:36:37 +01:00
coroutine-ucontext.c
coroutine-win32.c
crc32c.c
crc-ccitt.c util: Add CRC16 (CCITT) calculation routines 2021-01-24 20:10:54 +01:00
cutils.c utils: Work around mingw strto*l bug with 0x 2021-03-24 14:25:41 +00:00
dbus.c
drm.c
envlist.c
error.c
event_notifier-posix.c event_notifier: Set ->initialized earlier in event_notifier_init() 2021-02-16 17:15:39 +01:00
event_notifier-win32.c
fdmon-epoll.c
fdmon-io_uring.c
fdmon-poll.c
fifo8.c utils/fifo8: change fatal errors from abort() to assert() 2021-02-07 20:38:20 +00:00
filemonitor-inotify.c
filemonitor-stub.c
getauxval.c
guest-random.c
hbitmap.c
hexdump.c
host-utils.c
id.c net: Use id_generate() in the network subsystem, too 2021-03-09 21:47:45 +01:00
iov.c util/iov: make qemu_iovec_init_extended() honest 2021-02-03 08:00:33 -06:00
iova-tree.c
keyval.c keyval: Use GString to accumulate value strings 2020-12-19 10:39:23 +01:00
lockcnt.c
log.c
main-loop.c qtest: delete superfluous inclusions of qtest.h 2021-03-09 06:03:53 +01:00
memfd.c
meson.build yank: Always link full yank code 2021-04-01 15:27:44 +04:00
mmap-alloc.c memory: alloc RAM from file at offset 2021-02-09 20:53:56 +00:00
module.c util: fix use-after-free in module_load_one 2021-04-01 15:27:44 +04:00
notify.c
nvdimm-utils.c
osdep.c
oslib-posix.c memory: alloc RAM from file at offset 2021-02-09 20:53:56 +00:00
oslib-win32.c util/oslib-win32: Fix _aligned_malloc() arguments order 2021-01-11 14:59:21 +01:00
pagesize.c
path.c
qdist.c
qemu-co-shared-resource.c
qemu-config.c qemu-config: add error propagation to qemu_config_parse 2021-03-06 11:41:54 +01:00
qemu-coroutine-io.c
qemu-coroutine-lock.c coroutine-lock: Reimplement CoRwlock to fix downgrade bug 2021-03-31 10:44:21 +01:00
qemu-coroutine-sleep.c
qemu-coroutine.c
qemu-error.c error: rename error_with_timestamp to message_with_timestamp 2021-02-01 10:50:55 +00:00
qemu-openpty.c
qemu-option.c qemu-option: do not suggest using the delay option 2021-03-06 11:42:57 +01:00
qemu-print.c
qemu-progress.c
qemu-sockets.c
qemu-thread-common.h
qemu-thread-posix.c
qemu-thread-win32.c
qemu-timer-common.c semihosting: Implement SYS_ELAPSED and SYS_TICKFREQ 2021-01-18 10:05:06 +00:00
qemu-timer.c spapr: rollback 'unplug timeout' for CPU hotunplugs 2021-04-12 12:27:14 +10:00
qht.c
qsp.c
range.c
rcu.c
readline.c readline: Fix possible array index out of bounds in readline_hist_add() 2021-01-04 11:13:39 +00:00
selfmap.c
stats64.c
sys_membarrier.c
systemd.c
thread-pool.c
throttle.c Remove superfluous timer_del() calls 2021-01-08 15:13:38 +00:00
timed-average.c
trace-events migration: introduce UFFD-WP low-level interface helpers 2021-02-08 11:19:51 +00:00
trace.h
unicode.c
uri.c
userfaultfd.c migration: introduce UFFD-WP low-level interface helpers 2021-02-08 11:19:51 +00:00
uuid.c
vfio-helpers.c
vhost-user-server.c
yank.c yank: Remove dependency on qiochannel 2021-04-01 15:27:44 +04:00