vl: Use MachineClass instead of global QEMUMachine list

The machine registration flow is refactored to use the QOM functionality.
Instead of linking the machines into a list, each machine has a type
and the types can be traversed in the QOM way.

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
Marcel Apfelbaum 2014-03-05 19:30:46 +02:00 committed by Andreas Färber
parent 36d20cb2b3
commit 261747f176
2 changed files with 55 additions and 21 deletions

View file

@ -51,6 +51,7 @@ struct QEMUMachine {
const char *hw_version;
};
#define TYPE_MACHINE_SUFFIX "-machine"
int qemu_register_machine(QEMUMachine *m);
QEMUMachine *find_default_machine(void);