[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/35] ppc/xics: rework the ICS classes inheritance t
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 09/35] ppc/xics: rework the ICS classes inheritance tree |
Date: |
Tue, 3 Jul 2018 15:57:38 +1000 |
From: Cédric Le Goater <address@hidden>
With the previous changes, we can now let the ICS_KVM class inherit
directly from ICS_BASE class and not from the intermediate ICS_SIMPLE.
It makes the class hierarchy much cleaner.
What is left in the top classes is the low level interface to access
the KVM XICS device in ICS_KVM and the XICS emulating handlers in
ICS_SIMPLE.
This should not break migration compatibility.
Signed-off-by: Cédric Le Goater <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/intc/xics_kvm.c | 12 +++++-------
hw/ppc/spapr.c | 2 +-
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index b314eb7d16..30c3769a20 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -359,12 +359,10 @@ static void ics_kvm_class_init(ObjectClass *klass, void
*data)
ICSStateClass *icsc = ICS_BASE_CLASS(klass);
DeviceClass *dc = DEVICE_CLASS(klass);
- /*
- * Use device_class_set_parent_realize() when ics-kvm inherits
- * directly from ics-base and not from ics-simple anymore.
- */
- dc->realize = ics_kvm_realize;
- dc->reset = ics_kvm_reset;
+ device_class_set_parent_realize(dc, ics_kvm_realize,
+ &icsc->parent_realize);
+ device_class_set_parent_reset(dc, ics_kvm_reset,
+ &icsc->parent_reset);
icsc->pre_save = ics_get_kvm_state;
icsc->post_load = ics_set_kvm_state;
@@ -373,7 +371,7 @@ static void ics_kvm_class_init(ObjectClass *klass, void
*data)
static const TypeInfo ics_kvm_info = {
.name = TYPE_ICS_KVM,
- .parent = TYPE_ICS_SIMPLE,
+ .parent = TYPE_ICS_BASE,
.instance_size = sizeof(ICSState),
.class_init = ics_kvm_class_init,
};
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index b32b971a14..b2baec026f 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -137,7 +137,7 @@ static ICSState *spapr_ics_create(sPAPRMachineState *spapr,
goto error;
}
- return ICS_SIMPLE(obj);
+ return ICS_BASE(obj);
error:
error_propagate(errp, local_err);
--
2.17.1
- [Qemu-devel] [PULL 01/35] mac_dbdma: only dump commands for debug enabled channels, (continued)
- [Qemu-devel] [PULL 01/35] mac_dbdma: only dump commands for debug enabled channels, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 03/35] sam460ex: Fix sam460ex device tree when booting the Linux kernel, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 05/35] ppc/xics: introduce a parent_realize in ICSStateClass, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 08/35] ppc/xics: move the vmstate structures under the ics-base class, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 10/35] ppc/pnv: fix pnv_core_realize() error handling, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 02/35] mac_newworld: always enable disable_direct_reg3_writes for ADB machines, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 11/35] target/ppc: Add do_unaligned_access hook, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 20/35] target/ppc: Use MO_ALIGN for EXIWX and ECOWX, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 06/35] ppc/xics: move the instance_init handler under the ics-base class, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 07/35] ppx/xics: introduce a parent_reset in ICSStateClass, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 09/35] ppc/xics: rework the ICS classes inheritance tree,
David Gibson <=
- [Qemu-devel] [PULL 18/35] target/ppc: Split out gen_ld_atomic, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 21/35] target/ppc: Use atomic min/max helpers, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 04/35] ppc/xics: introduce ICP DeviceRealize and DeviceReset handlers, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 27/35] hw/timer: Add basic M41T80 emulation, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 14/35] target/ppc: Use atomic cmpxchg for STQCX, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 32/35] spapr: compute default value of "hpt-max-page-size" later, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 28/35] sam460ex: Add RTC device, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 31/35] target/ppc/kvm: don't pass cpu to kvm_get_smmu_info(), David Gibson, 2018/07/03
- [Qemu-devel] [PULL 17/35] target/ppc: Split out gen_load_locked, David Gibson, 2018/07/03
- [Qemu-devel] [PULL 16/35] target/ppc: Tidy gen_conditional_store, David Gibson, 2018/07/03