spapr: Create SPAPRMachine struct

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Tested-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Eduardo Habkost 2014-05-30 18:24:31 -03:00 committed by Alexander Graf
parent a70daba377
commit 748abce94f
1 changed files with 14 additions and 0 deletions

View File

@ -86,7 +86,20 @@
#define HTAB_SIZE(spapr) (1ULL << ((spapr)->htab_shift))
typedef struct SPAPRMachine SPAPRMachine;
#define TYPE_SPAPR_MACHINE "spapr-machine"
#define SPAPR_MACHINE(obj) \
OBJECT_CHECK(SPAPRMachine, (obj), TYPE_SPAPR_MACHINE)
/**
* SPAPRMachine:
*/
struct SPAPRMachine {
/*< private >*/
MachineState parent_obj;
};
sPAPREnvironment *spapr;
@ -1623,6 +1636,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
static const TypeInfo spapr_machine_info = {
.name = TYPE_SPAPR_MACHINE,
.parent = TYPE_MACHINE,
.instance_size = sizeof(SPAPRMachine),
.class_init = spapr_machine_class_init,
.interfaces = (InterfaceInfo[]) {
{ TYPE_FW_PATH_PROVIDER },