All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH qom-next 0/4] qom: HMP commands to replace info qtree
@ 2014-05-08 14:21 Andreas Färber
  2014-05-08 14:21 ` [Qemu-devel] [PATCH qom-next 1/4] qom: Implement info qom-composition HMP command Andreas Färber
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Andreas Färber @ 2014-05-08 14:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Crosthwaite, Markus Armbruster, Luiz Capitulino,
	Hani Benhabiles, Anthony Liguori, Paolo Bonzini,
	Andreas Färber

Hello,

The main patch of this series is an HMP command "info qom-composition",
which displays the machine composition tree. This names all devices,
including those missing in "info qtree" for lack of bus.

To make it more like "info qtree" bus-wise, we could extend it to display
link<> properties as well.

Properties of devices can be listed with "qom-list", like in QMP.

Based on a suggestion from Paolo, I went on to implement "qom-get" and
"qom-set" for reading and setting them, not basing on their QMP counterparts
but reimplementing them to circumvent the complicated QObject -> string
conversion Hani tried [1].

As I replied there, I think we can have both views - with and without
properties. My question is, should they be differently named commands?
Or an argument to the command? Should it go into qdev-monitor.c alongside
the old qdev HMP commands or into hmp.c? Is it okay to not base HMP commands
on their QMP counterparts, or is there any other visitor-based solution?

Built on top of my pending qom-tree script [2] but shouldn't depend on it.
I still consider that useful, but not resending it since it didn't change.

Regards,
Andreas

[1] http://patchwork.ozlabs.org/patch/343136/
[2] http://patchwork.ozlabs.org/patch/317224/

$ ./x86_64-softmmu/qemu-system-x86_64 -S -display none -monitor stdio
QEMU 2.0.50 monitor - type 'help' for more information
(qemu) info qom-composition
/machine (pc-i440fx-2.1-machine)
  /peripheral-anon (container)
  /peripheral (container)
  /unattached (container)
    /sysbus (System)
    /device[0] (qemu64-x86_64-cpu)
      /apic (apic)
    /device[1] (kvmvapic)
    /device[2] (i440FX)
    /device[3] (PIIX3)
      /isa.0 (ISA)
    /device[4] (isa-i8259)
    /device[5] (isa-i8259)
    /device[6] (cirrus-vga)
    /device[7] (hpet)
    /device[8] (mc146818rtc)
    /device[9] (isa-pit)
    /device[10] (isa-pcspk)
    /device[11] (isa-serial)
    /device[12] (isa-parallel)
    /device[13] (i8042)
    /device[14] (vmport)
    /device[15] (vmmouse)
    /device[16] (port92)
    /device[17] (isa-fdc)
    /device[18] (e1000)
    /device[19] (piix3-ide)
      /ide.0 (IDE)
      /ide.1 (IDE)
    /device[20] (ide-cd)
    /device[21] (PIIX4_PM)
      /i2c (i2c-bus)
    /device[22] (smbus-eeprom)
    /device[23] (smbus-eeprom)
    /device[24] (smbus-eeprom)
    /device[25] (smbus-eeprom)
    /device[26] (smbus-eeprom)
    /device[27] (smbus-eeprom)
    /device[28] (smbus-eeprom)
    /device[29] (smbus-eeprom)
  /icc-bridge (icc-bridge)
    /icc (icc-bus)
  /fw_cfg (fw_cfg)
  /i440fx (i440FX-pcihost)
    /pci.0 (PCI)
    /ioapic (ioapic)
(qemu) qom-list
/
(qemu) qom-list /
backend (child<container>)
machine (child<pc-i440fx-2.1-machine>)
type (string)
(qemu) qom-list /machine
i440fx (child<i440FX-pcihost>)
fw_cfg (child<fw_cfg>)
icc-bridge (child<icc-bridge>)
unattached (child<container>)
peripheral (child<container>)
peripheral-anon (child<container>)
type (string)
(qemu) qom-get /machine type
"pc-i440fx-2.1-machine"
(qemu) qom-get /machine/unassigned/device[0] realized
Device '/machine/unassigned/device[0]' not found
(qemu) qom-get /machine/unattached/device[0] realized
true
(qemu) qom-set /machine/unattached/device[0] realized true
(qemu) qom-set /machine/unattached/device[0] realized false
(qemu) 

Cc: Hani Benhabiles <hani@linux.com>
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Eric Blake <eblake@redhat.com>
Cc: Anthony Liguori <anthony@codemonkey.ws>
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Andreas Färber (4):
  qom: Implement info qom-composition HMP command
  qom: Implement qom-list HMP command
  qom: Implement qom-get HMP command
  qom: Implement qom-set HMP command

 hmp-commands.hx        | 39 +++++++++++++++++++++++++++++
 hmp.c                  | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++
 hmp.h                  |  3 +++
 include/monitor/qdev.h |  1 +
 monitor.c              |  7 ++++++
 qdev-monitor.c         | 35 ++++++++++++++++++++++++++
 6 files changed, 152 insertions(+)

-- 
1.8.4.5

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

end of thread, other threads:[~2014-05-18  0:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-08 14:21 [Qemu-devel] [PATCH qom-next 0/4] qom: HMP commands to replace info qtree Andreas Färber
2014-05-08 14:21 ` [Qemu-devel] [PATCH qom-next 1/4] qom: Implement info qom-composition HMP command Andreas Färber
2014-05-11 13:26   ` Hani Benhabiles
2014-05-08 14:21 ` [Qemu-devel] [PATCH qom-next 2/4] qom: Implement qom-list " Andreas Färber
2014-05-11 13:45   ` Hani Benhabiles
2014-05-08 14:21 ` [Qemu-devel] [PATCH qom-next 3/4] qom: Implement qom-get " Andreas Färber
2014-05-11 14:49   ` Hani Benhabiles
2014-05-08 14:21 ` [Qemu-devel] [PATCH qom-next 4/4] qom: Implement qom-set " Andreas Färber
2014-05-11 14:58   ` Hani Benhabiles
2014-05-18  0:38 ` [Qemu-devel] [PATCH qom-next 0/4] qom: HMP commands to replace info qtree Peter Crosthwaite

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.