From 36d20cb2b39311869b061e1669cb55ccbf0af759 Mon Sep 17 00:00:00 2001 From: Marcel Apfelbaum Date: Wed, 5 Mar 2014 19:30:45 +0200 Subject: hw/core: Introduce QEMU machine as QOM object MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The main functional change is to convert QEMUMachine into MachineClass and QEMUMachineInitArgs into MachineState, instance of MachineClass. As a first step, in order to make possible an incremental development, both QEMUMachine and QEMUMachineInitArgs are being embedded into the new types. Reviewed-by: Michael S. Tsirkin Signed-off-by: Marcel Apfelbaum Signed-off-by: Andreas Färber --- hw/core/machine.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 hw/core/machine.c (limited to 'hw/core/machine.c') diff --git a/hw/core/machine.c b/hw/core/machine.c new file mode 100644 index 0000000000..d3ffef7e07 --- /dev/null +++ b/hw/core/machine.c @@ -0,0 +1,28 @@ +/* + * QEMU Machine + * + * Copyright (C) 2014 Red Hat Inc + * + * Authors: + * Marcel Apfelbaum + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "hw/boards.h" + +static const TypeInfo machine_info = { + .name = TYPE_MACHINE, + .parent = TYPE_OBJECT, + .abstract = true, + .class_size = sizeof(MachineClass), + .instance_size = sizeof(MachineState), +}; + +static void machine_register_types(void) +{ + type_register_static(&machine_info); +} + +type_init(machine_register_types) -- cgit 1.4.1