summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Gibson2017-06-07 16:58:32 +0200
committerDavid Gibson2017-06-30 06:03:32 +0200
commit0dfabd39d523fc3f6f0f8c441f41c013cc429b52 (patch)
treeac88202439e0536371e015f72bd01a1692dde701 /include
parentspapr: Clean up DRC set_allocation_state path (diff)
downloadqemu-0dfabd39d523fc3f6f0f8c441f41c013cc429b52.tar.gz
qemu-0dfabd39d523fc3f6f0f8c441f41c013cc429b52.tar.xz
qemu-0dfabd39d523fc3f6f0f8c441f41c013cc429b52.zip
spapr: Clean up DRC set_isolation_state() path
There are substantial differences in the various paths through set_isolation_state(), both for setting to ISOLATED versus UNISOLATED state and for logical versus physical DRCs. So, split the set_isolation_state() method into isolate() and unisolate() methods, and give it different implementations for the two DRC types. Factor some minimal common checks, including for valid indicator values (which we weren't previously checking) into rtas_set_isolation_state(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/ppc/spapr_drc.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h
index 1674b668c8..d9cacb368f 100644
--- a/include/hw/ppc/spapr_drc.h
+++ b/include/hw/ppc/spapr_drc.h
@@ -215,10 +215,8 @@ typedef struct sPAPRDRConnectorClass {
const char *drc_name_prefix; /* used other places in device tree */
sPAPRDREntitySense (*dr_entity_sense)(sPAPRDRConnector *drc);
-
- /* accessors for guest-visible (generally via RTAS) DR state */
- uint32_t (*set_isolation_state)(sPAPRDRConnector *drc,
- sPAPRDRIsolationState state);
+ uint32_t (*isolate)(sPAPRDRConnector *drc);
+ uint32_t (*unisolate)(sPAPRDRConnector *drc);
/* QEMU interfaces for managing hotplug operations */
bool (*release_pending)(sPAPRDRConnector *drc);