qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel]  [PATCH v3 0/3] qemu-machine as a QOM object
@ 2014-03-05 17:30 Marcel Apfelbaum
  2014-03-05 17:30 ` [Qemu-devel] [PATCH v3 1/3] hw/core: introduced qemu machine as " Marcel Apfelbaum
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Marcel Apfelbaum @ 2014-03-05 17:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: ehabkost, mst, armbru, lcapitulino, blauwirbel, aliguori,
	imammedo, pbonzini, afaerber

RFC V2 -> V3
    Split the series into two parts, because the first part
    can be submitted as was already accepted (after this review).
    - The second part involves the replacement of machine opts
      queries with QOM queries and I will resend it separately.
    Addressed Andreas Färber's comments:
    - Dropped the Qemu prefix everywhere
    - Coding style issues (I really hope I got them all!)
    - machine class:' -machine' sufix instead of 'machine-' prefix
    - Regarding replacement of the init order machine_init/type_init:
      - I answered on the mail thread that I saw no issues.
      - I also stated there that I think that type_init should be before
        machine_init because the later is using the QOM subsystem.
   Addressed Paolo Bonzini's comments:
   - Added the current_machine to the QOM tree as '/machine'.
   - Passed current_machine->init_args to machine->init.
   - I will continue the series following his suggestions (Thanks!).

RFC v1 -> RFC v2
	Replaced QemuOpts access by QOM queries. (The main addition)
    Addressed Paolo Bonzini's comments:
    - Eliminated duplicate fields (of QEMUMachineInitArgs and QemuMachineState)
      I am not sure about this one, it does mess with the "const" usage.
      Maybe delay this duplication removal until after QEMUMachineInitArgs disappears
      completely?
    - Added "machine-" prefix to QOM machine type.
    - An instance of QEMUMachineInitArgs os is used by QemuMachineState and not a pointer.

The main benefit of QOMifying the qemu machine would be the possibility
to have options per machine type and not global.
However, there are other benefits as:
  - accessing qemu object properties instead of a global QemuOpts
    list from different code subsystems.
  - improving the machine "initialization" code (compat and stuff)
  - getting more close to QOM's vision of single interface for
    device creation and so on.

Basically the series aims (in the long run) to convert:
    QEMUMachine -> MachineClass
    QEMUMachineInitArgs -> MachineState.
As a first step, in order to make possible an incremental development,
both QEMUMachine and QEMUMachineInitArgs are being embedded into the
new types.


Marcel Apfelbaum (3):
  hw/core: introduced qemu machine as QOM object
  vl: use qemu machine QOM class instead of global machines list
  hw/boards: converted current_machine to be an instance of MachineCLass

 device-hotplug.c      |   4 +-
 hw/core/Makefile.objs |   2 +-
 hw/core/machine.c     |  28 ++++++++++++
 include/hw/boards.h   |  58 +++++++++++++++++++++++-
 qmp.c                 |   7 ++-
 vl.c                  | 121 ++++++++++++++++++++++++++++++++++----------------
 6 files changed, 176 insertions(+), 44 deletions(-)
 create mode 100644 hw/core/machine.c

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-03-11 19:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 17:30 [Qemu-devel] [PATCH v3 0/3] qemu-machine as a QOM object Marcel Apfelbaum
2014-03-05 17:30 ` [Qemu-devel] [PATCH v3 1/3] hw/core: introduced qemu machine as " Marcel Apfelbaum
2014-03-06 22:43   ` Andreas Färber
2014-03-07 11:31   ` Andreas Färber
2014-03-05 17:30 ` [Qemu-devel] [PATCH v3 2/3] vl: use qemu machine QOM class instead of global machines list Marcel Apfelbaum
2014-03-06 22:55   ` Andreas Färber
2014-03-05 17:30 ` [Qemu-devel] [PATCH v3 3/3] hw/boards: converted current_machine to be an instance of MachineCLass Marcel Apfelbaum
2014-03-05 17:36   ` Eric Blake
2014-03-05 17:59     ` Marcel Apfelbaum
2014-03-06 23:44   ` Andreas Färber
2014-03-07  1:16     ` Alexey Kardashevskiy
2014-03-07  5:40       ` Marcel Apfelbaum
2014-03-07  5:32     ` Marcel Apfelbaum
2014-03-07 11:27       ` Andreas Färber
2014-03-07 16:22         ` Marcel Apfelbaum
2014-03-07 16:27           ` Paolo Bonzini
2014-03-07 17:30           ` Andreas Färber
2014-03-07 20:41             ` Marcel Apfelbaum
2014-03-11 15:44             ` Marcel Apfelbaum
2014-03-11 16:48           ` Andreas Färber
2014-03-11 19:28             ` Marcel Apfelbaum
2014-03-07  8:36     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).