qemu-patch-raspberry4/include
Laurent Vivier 94fd9cbaa3 spapr: Treat devices added before inbound migration as coldplugged
When migrating a guest which has already had devices hotplugged,
libvirt typically starts the destination qemu with -incoming defer,
adds those hotplugged devices with qmp, then initiates the incoming
migration.

This causes problems for the management of spapr DRC state.  Because
the device is treated as hotplugged, it goes into a DRC state for a
device immediately after it's plugged, but before the guest has
acknowledged its presence.  However, chances are the guest on the
source machine *has* acknowledged the device's presence and configured
it.

If the source has fully configured the device, then DRC state won't be
sent in the migration stream: for maximum migration compatibility with
earlier versions we don't migrate DRCs in coldplug-equivalent state.
That means that the DRC effectively changes state over the migrate,
causing problems later on.

In addition, logging hotplug events for these devices isn't what we
want because a) those events should already have been issued on the
source host and b) the event queue should get wiped out by the
incoming state anyway.

In short, what we really want is to treat devices added before an
incoming migration as if they were coldplugged.

To do this, we first add a spapr_drc_hotplugged() helper which
determines if the device is hotplugged in the sense relevant for DRC
state management.  We only send hotplug events when this is true.
Second, when we add a device which isn't hotplugged in this sense, we
force a reset of the DRC state - this ensures the DRC is in a
coldplug-equivalent state (there isn't usually a system reset between
these device adds and the incoming migration).

This is based on an earlier patch by Laurent Vivier, cleaned up and
extended.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Tested-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>
2017-07-17 15:07:05 +10:00
..
block nbd: Implement NBD_INFO_BLOCK_SIZE on client 2017-07-14 12:04:42 +02:00
chardev hmp: add hmp analogue for qmp-chardev-change 2017-07-14 11:04:34 +02:00
crypto block: pass option prefix down to crypto layer 2017-07-11 17:44:56 +02:00
disas Fix Thumb-1 BE32 execution and disassembly. 2017-02-07 18:29:59 +00:00
exec memory/iommu: introduce IOMMUMemoryRegionClass 2017-07-14 12:04:41 +02:00
fpu softfloat: define floatx80_round() 2017-06-29 20:27:39 +02:00
hw spapr: Treat devices added before inbound migration as coldplugged 2017-07-17 15:07:05 +10:00
io trivial patches for 2017-05-10 2017-05-10 12:31:19 -04:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration migration: Create load_setup()/cleanup() methods 2017-07-10 17:52:21 +01:00
monitor block: rip out all traces of password prompting 2017-07-11 17:44:56 +02:00
net slirp: add a fake NC-SI backend 2017-04-25 19:17:25 +08:00
qapi Error reporting patches for 2017-07-13 2017-07-14 09:36:40 +01:00
qemu * gdbstub fixes (Alex) 2017-07-14 12:16:09 +01:00
qom cpu: Convert to DEFINE_PROP_LINK 2017-07-14 12:04:43 +02:00
standard-headers linux-headers: update to 4.13-rc0 2017-07-14 12:29:10 +02:00
sysemu Block layer patches 2017-07-13 13:38:57 +01:00
ui gtk: use framebuffer helper functions. 2017-06-21 14:23:16 +02:00
elf.h s390x/arch_dump: also dump guarded storage control block 2017-07-14 12:29:49 +02:00
glib-compat.h qga: Add 'guest-get-users' command 2017-04-26 23:57:45 -05:00
qemu-common.h tcg: make tcg_allowed global 2017-07-04 16:01:16 +02:00
qemu-io.h hmp: Request permissions in qemu-io 2017-02-28 20:47:50 +01:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00