]> git.proxmox.com Git - mirror_qemu.git/commit - hw/ppc/spapr_drc.c
spapr: Cleanups relating to DRC awaiting_release field
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 20 Jun 2017 13:02:41 +0000 (21:02 +0800)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 17 Jul 2017 05:07:05 +0000 (15:07 +1000)
commitf1c52354e5bdab6983d13a4c174759c585e834b3
treecea69ad90c560df42539aa5e2607ab9962b45d61
parenta8dc47fd8249cca45f6314bfd8cf195dc3fbd36b
spapr: Cleanups relating to DRC awaiting_release field

'awaiting_release' indicates that the host has requested an unplug of the
device attached to the DRC, but the guest has not (yet) put the device
into a state where it is safe to complete removal.

1. Rename it to 'unplug_requested' which to me at least is clearer

2. Remove the ->release_pending() method used to check this from outside
spapr_drc.c.  The method only plausibly has one implementation, so use
a plain function (spapr_drc_unplug_requested()) instead.

3. Remove it from the migration stream.  Attempting to migrate mid-unplug
is broken not just for spapr - in general management has no good way to
determine if the device should be present on the destination or not.  So,
until that's fixed, there's no point adding extra things to the stream.

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>
hw/ppc/spapr_drc.c
hw/ppc/spapr_pci.c
include/hw/ppc/spapr_drc.h