Features/QOM/Machine

From QEMU
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Machine as QOM object

The main benefits of QOMifying the qemu machine are:

  • The possibility to have options per machine type and not global.
  • Accessing qemu object properties instead of a global QemuOpts list from different code subsystems.
  • Improving the machine "initialization" code (replace macros usage).
  • Adding per machine functionality.
  • Getting more close to QOM's vision of single interface for device creation and so on.


Basically the project aims (in the long run) to convert:

   QEMUMachine -> MachineClass
   QEMUMachineInitArgs -> MachineState.

Status

  • QEMUMachine -> MachineClass transition is finished.
  • No need for QEMUMachine registration through vl.c. Now we have 2 paths:
    • Non QOM-ified machines will be converted to QOM on the fly in vl.c by qemu machine registration.
    • QOM-ified machines will behave as regular QOM classes setting MachineClass fields in class_init.

Plans

  • Replace QemuOpts queries by MachineState fields.
  • Allow options per machine instead of global.
  • Complete QEMUMachineInitArgs -> MachineState transition.
  • Replace PC_XXX_MACHINE_OPTIONS and PC_COMPAT_xxx macros usage by leveraging a good QOM hierarchy.
  • QOMify all the machines.
  • Get rid of 'machine registration' QEMU module.