summaryrefslogtreecommitdiffstats
path: root/include/hw/ppc/spapr_drc.h
diff options
context:
space:
mode:
authorGreg Kurz2020-02-14 16:01:22 +0100
committerDavid Gibson2020-02-20 23:15:04 +0100
commit4b63db1289a9e597bc151fa5e4d72f882cb6de1e (patch)
tree3ae95c0e36e58a3ee82d7bceb9982f3eb4b845cb /include/hw/ppc/spapr_drc.h
parentppc: free 'fdt' after reset the machine (diff)
downloadqemu-4b63db1289a9e597bc151fa5e4d72f882cb6de1e.tar.gz
qemu-4b63db1289a9e597bc151fa5e4d72f882cb6de1e.tar.xz
qemu-4b63db1289a9e597bc151fa5e4d72f882cb6de1e.zip
spapr: Don't use spapr_drc_needed() in CAS code
We currently don't support hotplug of devices between boot and CAS. If this happens a CAS reboot is triggered. We detect this during CAS using the spapr_drc_needed() function which is essentially a VMStateDescription .needed callback. Even if the condition for CAS reboot happens to be the same as for DRC migration, it looks wrong to piggyback a migration helper for this. Introduce a helper with slightly more explicit name and use it in both CAS and DRC migration code. Since a subsequent patch will enhance this helper to cover the case of hot unplug, let's go for spapr_drc_transient(). While here convert spapr_hotplugged_dev_before_cas() to the "transient" wording as well. This doesn't change any behaviour. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <158169248180.3465937.9531405453362718771.stgit@bahia.lan> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc/spapr_drc.h')
-rw-r--r--include/hw/ppc/spapr_drc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h
index df3d958a66..21af8deac1 100644
--- a/include/hw/ppc/spapr_drc.h
+++ b/include/hw/ppc/spapr_drc.h
@@ -278,7 +278,9 @@ int spapr_dt_drc(void *fdt, int offset, Object *owner, uint32_t drc_type_mask);
void spapr_drc_attach(SpaprDrc *drc, DeviceState *d, Error **errp);
void spapr_drc_detach(SpaprDrc *drc);
-bool spapr_drc_needed(void *opaque);
+
+/* Returns true if a hot plug/unplug request is pending */
+bool spapr_drc_transient(SpaprDrc *drc);
static inline bool spapr_drc_unplug_requested(SpaprDrc *drc)
{