diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2017-06-08 23:55:03 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-07-17 15:07:05 +1000 |
commit | 67fea71bf3be579ad0be5abe34cd6fa1bc65ad5b (patch) | |
tree | e18c0f3f797b5f6d7c089124a9dbf1a9ad1ab96d /include/hw/ppc/spapr_drc.h | |
parent | 4445b1d27ee65ceee12b71bc20242996c8eb5cf8 (diff) |
spapr: Implement DR-indicator for physical DRCs only
According to PAPR, the DR-indicator should only be valid for physical DRCs,
not logical DRCs. At the moment we implement it for all DRCs, so restrict
it to physical ones only.
We move the state to the physical DRC subclass, which means adding some
QOM boilerplate to handle the newly distinct type.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>
Tested-by: Daniel Barboza <danielhb@linux.vnet.ibm.com>
Diffstat (limited to 'include/hw/ppc/spapr_drc.h')
-rw-r--r-- | include/hw/ppc/spapr_drc.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h index 9d4fd41d22..a7958d0a8d 100644 --- a/include/hw/ppc/spapr_drc.h +++ b/include/hw/ppc/spapr_drc.h @@ -33,7 +33,7 @@ #define SPAPR_DRC_PHYSICAL_CLASS(klass) \ OBJECT_CLASS_CHECK(sPAPRDRConnectorClass, klass, \ TYPE_SPAPR_DRC_PHYSICAL) -#define SPAPR_DRC_PHYSICAL(obj) OBJECT_CHECK(sPAPRDRConnector, (obj), \ +#define SPAPR_DRC_PHYSICAL(obj) OBJECT_CHECK(sPAPRDRCPhysical, (obj), \ TYPE_SPAPR_DRC_PHYSICAL) #define TYPE_SPAPR_DRC_LOGICAL "spapr-drc-logical" @@ -198,9 +198,6 @@ typedef struct sPAPRDRConnector { uint32_t id; Object *owner; - /* DR-indicator */ - uint32_t dr_indicator; - uint32_t state; /* RTAS ibm,configure-connector state */ @@ -232,6 +229,14 @@ typedef struct sPAPRDRConnectorClass { void (*release)(DeviceState *dev); } sPAPRDRConnectorClass; +typedef struct sPAPRDRCPhysical { + /*< private >*/ + sPAPRDRConnector parent; + + /* DR-indicator */ + uint32_t dr_indicator; +} sPAPRDRCPhysical; + static inline bool spapr_drc_hotplugged(DeviceState *dev) { return dev->hotplugged && !runstate_check(RUN_STATE_INMIGRATE); |