aboutsummaryrefslogtreecommitdiff
path: root/include/hw/i386/microvm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/i386/microvm.h')
-rw-r--r--include/hw/i386/microvm.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h
index fd34b78e0d..36dbcdd123 100644
--- a/include/hw/i386/microvm.h
+++ b/include/hw/i386/microvm.h
@@ -24,6 +24,7 @@
#include "hw/boards.h"
#include "hw/i386/x86.h"
+#include "qom/object.h"
/* Platform virtio definitions */
#define VIRTIO_MMIO_BASE 0xfeb00000
@@ -39,13 +40,14 @@
#define MICROVM_MACHINE_OPTION_ROMS "x-option-roms"
#define MICROVM_MACHINE_AUTO_KERNEL_CMDLINE "auto-kernel-cmdline"
-typedef struct {
+struct MicrovmMachineClass {
X86MachineClass parent;
HotplugHandler *(*orig_hotplug_handler)(MachineState *machine,
DeviceState *dev);
-} MicrovmMachineClass;
+};
+typedef struct MicrovmMachineClass MicrovmMachineClass;
-typedef struct {
+struct MicrovmMachineState {
X86MachineState parent;
/* Machine type options */
@@ -58,14 +60,11 @@ typedef struct {
/* Machine state */
bool kernel_cmdline_fixed;
-} MicrovmMachineState;
+};
+typedef struct MicrovmMachineState MicrovmMachineState;
#define TYPE_MICROVM_MACHINE MACHINE_TYPE_NAME("microvm")
-#define MICROVM_MACHINE(obj) \
- OBJECT_CHECK(MicrovmMachineState, (obj), TYPE_MICROVM_MACHINE)
-#define MICROVM_MACHINE_GET_CLASS(obj) \
- OBJECT_GET_CLASS(MicrovmMachineClass, obj, TYPE_MICROVM_MACHINE)
-#define MICROVM_MACHINE_CLASS(class) \
- OBJECT_CLASS_CHECK(MicrovmMachineClass, class, TYPE_MICROVM_MACHINE)
+DECLARE_OBJ_CHECKERS(MicrovmMachineState, MicrovmMachineClass,
+ MICROVM_MACHINE, TYPE_MICROVM_MACHINE)
#endif