qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel]  [PATCH RFC V2 0/9] qemu-machine as a QOM object
@ 2014-03-02 13:07 Marcel Apfelbaum
  2014-03-02 13:07 ` [Qemu-devel] [PATCH RFC V2 1/9] hw/core: introduced qemu machine as " Marcel Apfelbaum
                   ` (9 more replies)
  0 siblings, 10 replies; 38+ messages in thread
From: Marcel Apfelbaum @ 2014-03-02 13:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, blauwirbel, mdroth, mst, armbru, mtosatti, agraf,
	ehabkost, lcapitulino, peter.crosthwaite, quintela, imammedo,
	aliguori, pbonzini, scottwood, edgar.iglesias, afaerber, rth

Most of the "Cc" list is due to patch 8: (Should I send each patch to a different list?)
    machine-opts: replace qemu_opt_get by QOM QemuMachine queries.

Status:
    - machine_opts are mapped into QemuMachineState's properties,
      which can be queried as regular QOM properties.
    - Subclassing QemuMachineClass allows to add a command line
      option specific to a machine type, error mechanism should
      work if this option is used on another machine. (Not tested, on the todo list.)
    - Next big step would be to completely remove the qemu machines initialization
      and replace it by regular QOM type registration.

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 -> QemuMachineClass
    QEMUMachineInitArgs -> QemuMachineState.
As a first step, in order to make possible an incremental development,
both QEMUMachine and QEMUMachineInitArgs are being embedded into the
new types.

Your comments are welcomed,
Marcel

Marcel Apfelbaum (9):
  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
    QemuMachineCLass
  hw/machine: add qemu machine opts as properties to QemuMachineState
  qapi: output visitor crashes qemu if it encounters a NULL value
  vl.c: do not set 'type' property in obj_set_property
  qom: add object_property_is_set
  machine-opts: replace qemu_opt_get by QOM QemuMachine queries
  hw/core: mapped QemuOpts into QEMUMachineInitArgs fields to remove
    duplication

 device-hotplug.c          |   4 +-
 device_tree.c             |   9 +-
 exec.c                    |  21 +++-
 hw/arm/boot.c             |   3 +-
 hw/core/Makefile.objs     |   2 +-
 hw/core/machine.c         | 289 ++++++++++++++++++++++++++++++++++++++++++++++
 hw/microblaze/boot.c      |  13 ++-
 hw/ppc/e500.c             |  21 ++--
 hw/ppc/spapr.c            |  14 ++-
 hw/ppc/virtex_ml507.c     |   3 +-
 include/hw/boards.h       |  60 +++++++++-
 include/qom/object.h      |  11 ++
 kvm-all.c                 |  11 +-
 qapi/qmp-output-visitor.c |   5 +
 qmp.c                     |   7 +-
 qom/object.c              |  12 ++
 target-i386/kvm.c         |  10 +-
 vl.c                      | 150 ++++++++++++++++--------
 18 files changed, 555 insertions(+), 90 deletions(-)
 create mode 100644 hw/core/machine.c

-- 
1.8.3.1

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

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

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-02 13:07 [Qemu-devel] [PATCH RFC V2 0/9] qemu-machine as a QOM object Marcel Apfelbaum
2014-03-02 13:07 ` [Qemu-devel] [PATCH RFC V2 1/9] hw/core: introduced qemu machine as " Marcel Apfelbaum
2014-03-03 12:56   ` Michael S. Tsirkin
2014-03-03 17:49   ` Andreas Färber
2014-03-03 19:06     ` Marcel Apfelbaum
2014-03-02 13:07 ` [Qemu-devel] [PATCH RFC V2 2/9] vl: use qemu machine QOM class instead of global machines list Marcel Apfelbaum
2014-03-03 12:58   ` Michael S. Tsirkin
2014-03-03 12:57     ` Paolo Bonzini
2014-03-03 13:03       ` Marcel Apfelbaum
2014-03-03 14:52         ` Andreas Färber
2014-03-03 15:05           ` Marcel Apfelbaum
2014-03-03 18:12   ` Andreas Färber
2014-03-03 19:54     ` Marcel Apfelbaum
2014-03-02 13:07 ` [Qemu-devel] [PATCH RFC V2 3/9] hw/boards: converted current_machine to be an instance of QemuMachineCLass Marcel Apfelbaum
2014-03-03 10:49   ` Paolo Bonzini
2014-03-03 12:07     ` Marcel Apfelbaum
2014-03-03 12:46       ` Paolo Bonzini
2014-03-03 12:11     ` Marcel Apfelbaum
2014-03-02 13:07 ` [Qemu-devel] [PATCH RFC V2 4/9] hw/machine: add qemu machine opts as properties to QemuMachineState Marcel Apfelbaum
2014-03-02 13:07 ` [Qemu-devel] [PATCH RFC V2 5/9] qapi: output visitor crashes qemu if it encounters a NULL value Marcel Apfelbaum
2014-03-02 13:07 ` [Qemu-devel] [PATCH RFC V2 6/9] vl.c: do not set 'type' property in obj_set_property Marcel Apfelbaum
2014-03-03 10:11   ` Paolo Bonzini
2014-03-03 12:09     ` Marcel Apfelbaum
2014-03-03 12:47       ` Paolo Bonzini
2014-03-02 13:07 ` [Qemu-devel] [PATCH RFC V2 7/9] qom: add object_property_is_set Marcel Apfelbaum
2014-03-03 10:13   ` Paolo Bonzini
2014-03-03 12:09     ` Marcel Apfelbaum
2014-03-02 13:07 ` [Qemu-devel] [PATCH RFC V2 8/9] machine-opts: replace qemu_opt_get by QOM QemuMachine queries Marcel Apfelbaum
2014-03-03 10:11   ` Paolo Bonzini
2014-03-03 12:10     ` Marcel Apfelbaum
2014-03-02 13:07 ` [Qemu-devel] [PATCH RFC V2 9/9] hw/core: mapped QemuOpts into QEMUMachineInitArgs fields to remove duplication Marcel Apfelbaum
2014-03-03 10:13   ` Paolo Bonzini
2014-03-03 12:10     ` Marcel Apfelbaum
2014-03-03 10:50 ` [Qemu-devel] [PATCH RFC V2 0/9] qemu-machine as a QOM object Paolo Bonzini
2014-03-03 12:07   ` Marcel Apfelbaum
2014-03-03 12:56     ` Paolo Bonzini
2014-03-03 13:17       ` Marcel Apfelbaum
2014-03-03 14:10         ` Andreas Färber

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).