xemu/include/qemu
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
..
accel.h accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
atomic128.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
atomic.h qemu/atomic: Drop special case for unsupported compiler 2020-12-15 12:52:07 -05:00
base64.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
bcd.h
bitmap.h
bitops.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
bswap.h bswap.h: Remove unused float-access functions 2021-02-15 09:38:50 +00:00
buffer.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
cacheflush.h util: Enhance flush_icache_range with separate data pointer 2021-01-07 05:09:41 -10:00
co-shared-resource.h
compiler.h qemu/compiler: Split out qemu_build_not_reached_always 2021-01-22 12:48:01 -10:00
config-file.h qemu-config: add error propagation to qemu_config_parse 2021-03-06 11:41:54 +01:00
coroutine_int.h
coroutine.h coroutine-lock: Reimplement CoRwlock to fix downgrade bug 2021-03-31 10:44:21 +01:00
cpuid.h
crc32c.h
crc-ccitt.h util: Add CRC16 (CCITT) calculation routines 2021-01-24 20:10:54 +01:00
ctype.h
cutils.h cutils: replace strdup with g_strdup 2020-11-03 09:42:52 -05:00
datadir.h vl: extract softmmu/datadir.c 2020-12-10 12:15:18 -05:00
dbus.h
drm.h
envlist.h
error-report.h error: rename error_with_timestamp to message_with_timestamp 2021-02-01 10:50:55 +00:00
event_notifier.h event_notifier: handle initialization failure better 2021-02-08 14:43:55 +01:00
fifo8.h utils/fifo8: add VMSTATE_FIFO8_TEST macro 2021-02-07 20:38:34 +00:00
fifo32.h
filemonitor.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
futex.h
guest-random.h
hbitmap.h
help_option.h keyval: Parse help options 2020-10-15 16:06:27 +02:00
host-utils.h fix the prototype of muls64/mulu64 2020-07-06 18:13:13 +02:00
id.h net: Use id_generate() in the network subsystem, too 2021-03-09 21:47:45 +01:00
int128.h qemu/int128: Add int128_or 2021-02-18 07:48:22 -08:00
iov.h util/iov: make qemu_iovec_init_extended() honest 2021-02-03 08:00:33 -06:00
iova-tree.h
jhash.h
job.h job: add .cancel handler for the driver 2021-02-12 11:23:19 -06:00
lockable.h
log-for-trace.h
log.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
main-loop.h main-loop: Fix comment 2020-09-01 12:07:52 +02:00
memfd.h
mmap-alloc.h memory: alloc RAM from file at offset 2021-02-09 20:53:56 +00:00
module.h module: silence errors for module_load_qom_all(). 2020-10-15 10:43:48 +02:00
notify.h
nvdimm-utils.h Clean up includes 2020-12-10 17:16:44 +01:00
option_int.h
option.h qemu-option: restrict qemu_opts_set to merge-lists QemuOpts 2020-12-10 12:15:12 -05:00
osdep.h osdep: build with non-working system() function 2021-01-29 10:47:28 +00:00
path.h
plugin-memory.h
plugin.h accel/tcg: allow plugin instrumentation to be disable via cflags 2021-02-18 08:19:23 +00:00
pmem.h
processor.h
progress_meter.h
qdist.h
qemu-plugin.h plugins: Fixes typo in qemu-plugin.h 2021-03-17 07:17:46 +00:00
qemu-print.h
qht.h
qsp.h
queue.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
range.h
ratelimit.h
rcu_queue.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
rcu.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
readline.h
selfmap.h
seqlock.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
sockets.h net: check if the file descriptor is valid before using it 2020-07-15 21:00:13 +08:00
stats64.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
sys_membarrier.h
systemd.h
thread-posix.h
thread-win32.h
thread.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
throttle-options.h
throttle.h
timed-average.h
timer.h spapr: rollback 'unplug timeout' for CPU hotunplugs 2021-04-12 12:27:14 +10:00
tsan.h
typedefs.h exec: Move TranslationBlock typedef to qemu/typedefs.h 2021-02-18 08:19:08 +00:00
unicode.h
units.h
uri.h
userfaultfd.h migration: introduce UFFD-WP low-level interface helpers 2021-02-08 11:19:51 +00:00
uuid.h
vfio-helpers.h util/vfio-helpers: Pass page protections to qemu_vfio_pci_map_bar() 2020-10-05 09:35:52 +01:00
vhost-user-server.h libvhost-user: make it a meson subproject 2020-12-08 13:48:58 -05:00
win_dump_defs.h
xattr.h
xxhash.h target/arm: Implement an IMPDEF pauth algorithm 2021-01-19 14:38:51 +00:00
yank.h yank: Remove dependency on qiochannel 2021-04-01 15:27:44 +04:00