All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/9] qom: HMP commands to supersede info qtree
@ 2015-03-12 16:43 Andreas Färber
  2015-03-12 16:43 ` [Qemu-devel] [PATCH v2 1/9] scripts: Add qom-tree script Andreas Färber
                   ` (11 more replies)
  0 siblings, 12 replies; 19+ messages in thread
From: Andreas Färber @ 2015-03-12 16:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Crosthwaite, Markus Armbruster, Luiz Capitulino,
	Hani Benhabiles, Paolo Bonzini, Andreas Färber

Hello,

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

Properties can be listed with "qom-list" and set with "qom-set", like in QMP.

"qom-get" and displaying properties as part of "info qom-tree" ran into
StringOutputVisitor limitations - this v2 therefore stubs that support out
so that we don't crash.

This series has been around for a year now; I hope to get at least qom-list and
the basic info qom-tree into v2.3, as visualization of my upcoming CPU changes.

Also included are two proposed cleanups of nodes in /machine namespace.
By making it easier to inspect the tree, I hope we'll detect this earlier.

Regards,
Andreas

v1 -> v2:
* Included qom-tree script in series, updating Anthony's email address (Eric)
  and dropping reference to "info qtree" from subject (Paolo);
  script did otherwise not change, so leaving 2013 copyright
* Renamed from "info qom-composition" to "info qom-tree" (Hani/Paolo)
* Renamed functions from do_* to hmp_* according to changed surrounding code
* Simplified qom-list according to Hani's suggestion
* Added warning for ambiguous paths to qom-set (Hani)
* Added patch stubbing out StringOutputVisitor struct support for qom-get (Hani)
* Added documentation for info qom-tree
* Implemented "info qom-tree /foo" and "info qom-tree -v" options
* Added patch cleaning up MemoryRegion nodes from /machine
* Added patch cleaning up IRQ nodes from /machine

$ ./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-tree
/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: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Andreas Färber (9):
  scripts: Add qom-tree script
  qom: Implement qom-list HMP command
  qom: Implement qom-set HMP command
  qom: Implement info qom-tree HMP command
  qapi: Stub out StringOutputVisitor struct support
  qom: Implement qom-get HMP command
  qom: Add verbose option to info qom-tree HMP command
  memory: Move owner-less MemoryRegions to /machine/unattached
  qdev: Move owner-less IRQs to /machine/unattached

 hmp-commands.hx              | 41 ++++++++++++++++++++
 hmp.c                        | 69 +++++++++++++++++++++++++++++++++
 hmp.h                        |  3 ++
 hw/core/qdev.c               |  5 ++-
 include/monitor/qdev.h       |  1 +
 memory.c                     |  2 +-
 monitor.c                    |  7 ++++
 qapi/string-output-visitor.c | 14 +++++++
 qdev-monitor.c               | 92 ++++++++++++++++++++++++++++++++++++++++++++
 scripts/qmp/qom-tree         | 70 +++++++++++++++++++++++++++++++++
 10 files changed, 301 insertions(+), 3 deletions(-)
 create mode 100755 scripts/qmp/qom-tree

-- 
2.1.4

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

end of thread, other threads:[~2015-03-17 17:18 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12 16:43 [Qemu-devel] [PATCH v2 0/9] qom: HMP commands to supersede info qtree Andreas Färber
2015-03-12 16:43 ` [Qemu-devel] [PATCH v2 1/9] scripts: Add qom-tree script Andreas Färber
2015-03-12 16:43 ` [Qemu-devel] [PATCH v2 2/9] qom: Implement qom-list HMP command Andreas Färber
2015-03-13  1:32   ` Gonglei
2015-03-12 16:43 ` [Qemu-devel] [PATCH v2 3/9] qom: Implement qom-set " Andreas Färber
2015-03-13  1:34   ` Gonglei
2015-03-12 16:43 ` [Qemu-devel] [PATCH v2 4/9] qom: Implement info qom-tree " Andreas Färber
2015-03-12 16:43 ` [Qemu-devel] [PATCH v2 5/9] qapi: Stub out StringOutputVisitor struct support Andreas Färber
2015-03-12 16:43 ` [Qemu-devel] [PATCH v2 6/9] qom: Implement qom-get HMP command Andreas Färber
2015-03-13  1:36   ` Gonglei
2015-03-12 16:43 ` [Qemu-devel] [PATCH v2 7/9] qom: Add verbose option to info qom-tree " Andreas Färber
2015-03-12 16:43 ` [Qemu-devel] [PATCH v2 8/9] memory: Move owner-less MemoryRegions to /machine/unattached Andreas Färber
2015-03-12 18:05   ` Paolo Bonzini
2015-03-12 19:16     ` Andreas Färber
2015-03-12 16:43 ` [Qemu-devel] [PATCH v2 9/9] qdev: Move owner-less IRQs " Andreas Färber
2015-03-13  1:30 ` [Qemu-devel] [PATCH v2 0/9] qom: HMP commands to supersede info qtree Gonglei
2015-03-17  5:15   ` Alistair Francis
2015-03-17  7:33 ` Markus Armbruster
2015-03-17 17:17 ` Andreas Färber

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.