[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v4 7/8] vl: allow customizing the class of /machine
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-ppc] [PATCH v4 7/8] vl: allow customizing the class of /machine |
Date: |
Wed, 11 Dec 2013 21:22:20 +1100 |
From: Paolo Bonzini <address@hidden>
This is a first step towards QOMifying /machine.
Signed-off-by: Paolo Bonzini <address@hidden>
---
include/hw/boards.h | 1 +
vl.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 5a7ae9f..431d016 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -25,6 +25,7 @@ typedef struct QEMUMachine {
const char *name;
const char *alias;
const char *desc;
+ const char *class_name;
QEMUMachineInitFunc *init;
QEMUMachineResetFunc *reset;
QEMUMachineHotAddCPUFunc *hot_add_cpu;
diff --git a/vl.c b/vl.c
index 2cde6a1..442b190 100644
--- a/vl.c
+++ b/vl.c
@@ -4047,6 +4047,11 @@ int main(int argc, char **argv, char **envp)
qtest_init();
}
+ if (machine->class_name) {
+ Object *m = object_new(machine->class_name);
+ object_property_add_child(object_get_root(), "machine", m, NULL);
+ }
+
machine_opts = qemu_get_machine_opts();
kernel_filename = qemu_opt_get(machine_opts, "kernel");
initrd_filename = qemu_opt_get(machine_opts, "initrd");
--
1.8.4.rc4
- [Qemu-ppc] [PATCH v4 0/8] spapr: bootindex support, Alexey Kardashevskiy, 2013/12/11
- [Qemu-ppc] [PATCH v4 1/8] qom: do not register interface "types" in the type table, Alexey Kardashevskiy, 2013/12/11
- [Qemu-ppc] [PATCH v4 2/8] qom: detect bad reentrance during object_class_foreach, Alexey Kardashevskiy, 2013/12/11
- [Qemu-ppc] [PATCH v4 6/8] qdev: introduce FWPathProvider interface, Alexey Kardashevskiy, 2013/12/11
- [Qemu-ppc] [PATCH v4 8/8] spapr: define interface to fix device pathname, Alexey Kardashevskiy, 2013/12/11
- [Qemu-ppc] [PATCH v4 3/8] boot: extend get_boot_devices_list() to ignore suffixes, Alexey Kardashevskiy, 2013/12/11
- [Qemu-ppc] [PATCH v4 4/8] spapr-llan: add to boot device list, Alexey Kardashevskiy, 2013/12/11
- [Qemu-ppc] [PATCH v4 7/8] vl: allow customizing the class of /machine,
Alexey Kardashevskiy <=
- [Qemu-ppc] [PATCH v4 5/8] spapr-vio: fix firmware names, Alexey Kardashevskiy, 2013/12/11
- Re: [Qemu-ppc] [PATCH v4 0/8] spapr: bootindex support, Paolo Bonzini, 2013/12/11
- Re: [Qemu-ppc] [PATCH v4 0/8] spapr: bootindex support, Michael S. Tsirkin, 2013/12/12