mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
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>
This commit is contained in:
parent
a8dc47fd82
commit
f1c52354e5
3 changed files with 17 additions and 26 deletions
|
@ -199,10 +199,9 @@ typedef struct sPAPRDRConnector {
|
|||
bool configured;
|
||||
sPAPRConfigureConnectorState *ccs;
|
||||
|
||||
bool awaiting_release;
|
||||
|
||||
/* device pointer, via link property */
|
||||
DeviceState *dev;
|
||||
bool unplug_requested;
|
||||
} sPAPRDRConnector;
|
||||
|
||||
typedef struct sPAPRDRConnectorClass {
|
||||
|
@ -218,9 +217,6 @@ typedef struct sPAPRDRConnectorClass {
|
|||
uint32_t (*isolate)(sPAPRDRConnector *drc);
|
||||
uint32_t (*unisolate)(sPAPRDRConnector *drc);
|
||||
void (*release)(DeviceState *dev);
|
||||
|
||||
/* QEMU interfaces for managing hotplug operations */
|
||||
bool (*release_pending)(sPAPRDRConnector *drc);
|
||||
} sPAPRDRConnectorClass;
|
||||
|
||||
static inline bool spapr_drc_hotplugged(DeviceState *dev)
|
||||
|
@ -244,4 +240,9 @@ void spapr_drc_attach(sPAPRDRConnector *drc, DeviceState *d, void *fdt,
|
|||
int fdt_start_offset, Error **errp);
|
||||
void spapr_drc_detach(sPAPRDRConnector *drc);
|
||||
|
||||
static inline bool spapr_drc_unplug_requested(sPAPRDRConnector *drc)
|
||||
{
|
||||
return drc->unplug_requested;
|
||||
}
|
||||
|
||||
#endif /* HW_SPAPR_DRC_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue