qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need to parse -help output
@ 2012-07-27 13:37 Anthony Liguori
  2012-07-27 13:37 ` [Qemu-devel] [PATCH 1/7] qmp: introduce device-list-properties command Anthony Liguori
                   ` (7 more replies)
  0 siblings, 8 replies; 47+ messages in thread
From: Anthony Liguori @ 2012-07-27 13:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, libvir-list, Alexander Graf, Markus Armbruster,
	Eric Blake

This series implements the necessary commands to implements danpb's idea to
remove -help parsing in libvirt.  We would introduce all of these commands in
1.2 and then change the -help output starting in 1.3.

Here is Dan's plan from a previous thread:

<danpb>

 Basically I'd sum up my new idea as "just use QMP".

  * No new command line arguments like -capabilities

  * libvirt invokes something like

      $QEMUBINARY -qmp CHARDEV -nodefault -nodefconfig -nographics

  * libvirt then runs a number of  QMP commands to find out
    what it needs to know. I'd expect the following existing
    commands would be used

      - query-version             - already supported
      - query-commands            - already supported
      - query-events              - already supported
      - query-kvm                 - already supported
      - qom-{list,list-types,get} - already supported
      - query-spice/vnc           - already supported

 And add the following new commands

      - query-devices             - new, -device ?, and/or -device NAME,? data
 in QMP
      - query-machines            - new, -M ? in QMP
      - query-cpu-types           - new, -cpu ? in QMP

 The above would take care of probably 50% of the current libvirt
 capabilities probing, including a portion of the -help stuff. Then
 there is all the rest of the crap we detect from the -help. We could
 just take the view, that "as of 1.2", we assume everything we previously
 detected is just available by default, and thus don't need to probe
 it.  For stuff that is QOM based, I expect we'll be able to detect new
 features in the future using the qom-XXX monitor commands. For stuff
 that is non-qdev, and non-qom, libvirt can just do a plain version
 number check, unless we decide there is specific info worth exposing
 via other new 'query-XXX' monitor commands.
 Basically I'd sum up my new idea as "just use QMP".

  * No new command line arguments like -capabilities

  * libvirt invokes something like

      $QEMUBINARY -qmp CHARDEV -nodefault -nodefconfig -nographics

  * libvirt then runs a number of  QMP commands to find out
    what it needs to know. I'd expect the following existing
    commands would be used

      - query-version             - already supported
      - query-commands            - already supported
      - query-events              - already supported
      - query-kvm                 - already supported
      - qom-{list,list-types,get} - already supported
      - query-spice/vnc           - already supported

    And add the following new commands

      - query-devices             - new, -device ?, and/or -device NAME,? data
 in QMP
      - query-machines            - new, -M ? in QMP
      - query-cpu-types           - new, -cpu ? in QMP

 The above would take care of probably 50% of the current libvirt
 capabilities probing, including a portion of the -help stuff. Then
 there is all the rest of the crap we detect from the -help. We could
 just take the view, that "as of 1.2", we assume everything we previously
 detected is just available by default, and thus don't need to probe
 it.  For stuff that is QOM based, I expect we'll be able to detect new
 features in the future using the qom-XXX monitor commands. For stuff
 that is non-qdev, and non-qom, libvirt can just do a plain version
 number check, unless we decide there is specific info worth exposing
 via other new 'query-XXX' monitor commands.

</danpb>

The one thing to note is that I didn't add a query-devices command because you
can already do:

qmp query-devices --implements=device --abstract=False

To get the equivalent output of -device ?.  Instead, I added a command to list
specific properties of a device which is the equivalent of -device FOO,?

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

end of thread, other threads:[~2012-08-10 17:30 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-27 13:37 [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need to parse -help output Anthony Liguori
2012-07-27 13:37 ` [Qemu-devel] [PATCH 1/7] qmp: introduce device-list-properties command Anthony Liguori
2012-07-27 16:05   ` Luiz Capitulino
2012-08-10 14:40     ` Anthony Liguori
2012-07-27 13:37 ` [Qemu-devel] [PATCH 2/7] qapi: mark QOM commands stable Anthony Liguori
2012-07-27 16:06   ` Luiz Capitulino
2012-08-10 14:40     ` Anthony Liguori
2012-07-27 13:37 ` [Qemu-devel] [PATCH 3/7] qapi: add query-machines command Anthony Liguori
2012-07-27 16:12   ` Luiz Capitulino
2012-08-10 14:41     ` Anthony Liguori
2012-08-10 14:50       ` Luiz Capitulino
2012-08-10 16:06         ` Anthony Liguori
2012-08-10 16:15           ` Luiz Capitulino
2012-07-27 17:25   ` Eric Blake
2012-07-27 18:12     ` Anthony Liguori
2012-07-27 18:28       ` Eric Blake
2012-07-27 13:37 ` [Qemu-devel] [PATCH 4/7] compiler: add macro for GCC weak symbols Anthony Liguori
2012-07-27 13:50   ` Peter Maydell
2012-07-27 14:27     ` Anthony Liguori
2012-07-27 14:45       ` Peter Maydell
2012-07-27 15:31         ` Anthony Liguori
2012-07-27 19:34           ` Blue Swirl
2012-07-27 20:51             ` Anthony Liguori
2012-07-27 21:04               ` Blue Swirl
2012-07-27 22:40                 ` Anthony Liguori
2012-07-28  6:25                   ` Markus Armbruster
2012-07-28  8:52                     ` Blue Swirl
2012-07-28  8:45                   ` Blue Swirl
2012-07-28  6:50           ` Peter Maydell
2012-07-28  8:58             ` Blue Swirl
2012-07-27 15:32     ` Anthony Liguori
2012-07-27 13:37 ` [Qemu-devel] [PATCH 5/7] qapi: add query-cpudefs command Anthony Liguori
2012-07-27 14:00   ` Peter Maydell
2012-07-27 15:01     ` Anthony Liguori
2012-07-27 16:19   ` Luiz Capitulino
2012-07-27 18:37   ` Eric Blake
2012-07-27 13:37 ` [Qemu-devel] [PATCH 6/7] target-i386: add implementation of query-cpudefs Anthony Liguori
2012-07-31 15:57   ` Eduardo Habkost
2012-08-10 14:43     ` Anthony Liguori
2012-08-10 15:59       ` Eduardo Habkost
2012-08-10 16:37         ` Anthony Liguori
2012-08-10 16:51           ` Eduardo Habkost
2012-08-10 17:09             ` Anthony Liguori
2012-08-10 17:31               ` Eduardo Habkost
2012-07-27 13:37 ` [Qemu-devel] [PATCH 7/7] target-ppc: " Anthony Liguori
2012-07-27 16:21 ` [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need to parse -help output Luiz Capitulino
2012-07-27 16:37   ` Daniel P. Berrange

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