[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 06/27] spapr: Add sPAPRMachineClass
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 06/27] spapr: Add sPAPRMachineClass |
Date: |
Thu, 2 Jul 2015 16:09:17 +1000 |
Currently although we have an sPAPRMachineState descended from MachineState
we don't have an sPAPRMAchineClass descended from MachineClass. So far it
hasn't been needed, but several upcoming features are going to want it,
so this patch creates a stub implementation.
Signed-off-by: Michael Roth <address@hidden>
Signed-off-by: Bharata B Rao <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr.c | 1 +
include/hw/ppc/spapr.h | 15 +++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 3aeb2ea..0dba32f 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1808,6 +1808,7 @@ static const TypeInfo spapr_machine_info = {
.abstract = true,
.instance_size = sizeof(sPAPRMachineState),
.instance_init = spapr_machine_initfn,
+ .class_size = sizeof(sPAPRMachineClass),
.class_init = spapr_machine_class_init,
.interfaces = (InterfaceInfo[]) {
{ TYPE_FW_PATH_PROVIDER },
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 785b094..0aeac50 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -15,11 +15,26 @@ typedef struct sPAPREventLogEntry sPAPREventLogEntry;
#define HPTE64_V_HPTE_DIRTY 0x0000000000000040ULL
#define SPAPR_ENTRY_POINT 0x100
+typedef struct sPAPRMachineClass sPAPRMachineClass;
typedef struct sPAPRMachineState sPAPRMachineState;
#define TYPE_SPAPR_MACHINE "spapr-machine"
#define SPAPR_MACHINE(obj) \
OBJECT_CHECK(sPAPRMachineState, (obj), TYPE_SPAPR_MACHINE)
+#define SPAPR_MACHINE_GET_CLASS(obj) \
+ OBJECT_GET_CLASS(sPAPRMachineClass, obj, TYPE_SPAPR_MACHINE)
+#define SPAPR_MACHINE_CLASS(klass) \
+ OBJECT_CLASS_CHECK(sPAPRMachineClass, klass, TYPE_SPAPR_MACHINE)
+
+/**
+ * sPAPRMachineClass:
+ */
+struct sPAPRMachineClass {
+ /*< private >*/
+ MachineClass parent_class;
+
+ /*< public >*/
+};
/**
* sPAPRMachineState:
--
2.4.3
- [Qemu-ppc] [PATCH 00/27] sPAPR updates 2015-07-02, David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 01/27] spapr: ensure we have at least one XICS server, David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 04/27] spapr: Remove obsolete ram_limit field from sPAPRMachineState, David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 10/27] spapr_iommu: drop erroneous check in h_put_tce_indirect(), David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 11/27] spapr_iommu: translate sPAPRTCEAccess to IOMMUAccessFlags, David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 06/27] spapr: Add sPAPRMachineClass,
David Gibson <=
- [Qemu-ppc] [PATCH 07/27] spapr_pci: encode missing 64-bit memory address space, David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 08/27] spapr_pci: encode class code including Prog IF register, David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 05/27] spapr: Remove obsolete entry_point field from sPAPRMachineState, David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 12/27] Revert "hw/ppc/spapr_pci.c: Avoid functions not in glib 2.12 (g_hash_table_iter_*)", David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 13/27] spapr: Consider max_cpus during xics initialization, David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 09/27] spapr_pci: set device node unit address as hex, David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 15/27] cpus: Add a macro to walk CPUs in reverse, David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 23/27] spapr_vty: lookup should only return valid VTY objects, David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 24/27] spapr-vty: Use TYPE_ definition instead of hardcoding, David Gibson, 2015/07/02
- [Qemu-ppc] [PATCH 19/27] xics_kvm: Don't enable KVM_CAP_IRQ_XICS if already enabled, David Gibson, 2015/07/02