qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel.a@redhat.com>
To: qemu-devel@nongnu.org
Cc: ehabkost@redhat.com, mst@redhat.com, armbru@redhat.com,
	lcapitulino@redhat.com, blauwirbel@gmail.com,
	aliguori@amazon.com, imammedo@redhat.com, pbonzini@redhat.com,
	afaerber@suse.de
Subject: [Qemu-devel]  [PATCH v3 0/3] qemu-machine as a QOM object
Date: Wed,  5 Mar 2014 19:30:44 +0200	[thread overview]
Message-ID: <1394040647-20083-1-git-send-email-marcel.a@redhat.com> (raw)

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

             reply	other threads:[~2014-03-05 17:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 17:30 Marcel Apfelbaum [this message]
2014-03-05 17:30 ` [Qemu-devel] [PATCH v3 1/3] hw/core: introduced qemu machine as QOM object 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1394040647-20083-1-git-send-email-marcel.a@redhat.com \
    --to=marcel.a@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=armbru@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).