diff options
author | Greg Kurz <groug@kaod.org> | 2019-12-19 19:11:47 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-01-08 11:01:59 +1100 |
commit | 6cc64796f2b031186b6ae9c6c5932ea972a8c6cd (patch) | |
tree | b7a42406ff37b203ccad52dc99e88395140dd16c /include | |
parent | 068fe58cf93030fd96b7659bfc7626867ecd518a (diff) |
spapr/xive: Use device_class_set_parent_realize()
The XIVE router base class currently inherits an empty realize hook
from the sysbus device base class, but it will soon implement one
of its own to perform some sanity checks. Do the preliminary plumbing
to have it called.
Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20191219181155.32530-6-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/ppc/spapr_xive.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr_xive.h b/include/hw/ppc/spapr_xive.h index 3a103c224d..93d09d68de 100644 --- a/include/hw/ppc/spapr_xive.h +++ b/include/hw/ppc/spapr_xive.h @@ -15,6 +15,10 @@ #define TYPE_SPAPR_XIVE "spapr-xive" #define SPAPR_XIVE(obj) OBJECT_CHECK(SpaprXive, (obj), TYPE_SPAPR_XIVE) +#define SPAPR_XIVE_CLASS(klass) \ + OBJECT_CLASS_CHECK(SpaprXiveClass, (klass), TYPE_SPAPR_XIVE) +#define SPAPR_XIVE_GET_CLASS(obj) \ + OBJECT_GET_CLASS(SpaprXiveClass, (obj), TYPE_SPAPR_XIVE) typedef struct SpaprXive { XiveRouter parent; @@ -47,6 +51,12 @@ typedef struct SpaprXive { VMChangeStateEntry *change; } SpaprXive; +typedef struct SpaprXiveClass { + XiveRouterClass parent; + + DeviceRealize parent_realize; +} SpaprXiveClass; + /* * The sPAPR machine has a unique XIVE IC device. Assign a fixed value * to the controller block id value. It can nevertheless be changed |