All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/12] qdev: cleanup legacy properties
@ 2014-01-30 13:09 Paolo Bonzini
  2014-01-30 13:09 ` [Qemu-devel] [PATCH 01/12] qapi: add size parser to StringInputVisitor Paolo Bonzini
                   ` (13 more replies)
  0 siblings, 14 replies; 39+ messages in thread
From: Paolo Bonzini @ 2014-01-30 13:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, afaerber

The conversion of qdev to QOM brought with it legacy properties.
Legacy properties are always have a string type (the accessors always
call visit_type_str), and were used to support -device syntax while
keeping QOM properties strongly typed.  For example, an hex8 property
is registered twice, once as an integer-typed property and once as a
legacy property that enforces base 16 for its input.

However, when introducing legacy properties, the hex8/32/64 had a small
change applied: the previously-optional "0x" prefix became mandatory,
and an error was raised if you omitted it.  This was in preparation
for making the legacy properties read-only, and changing the hex8/32/64
properties to uint8/32/64.  This series does exactly this in patches 1-6.

On the printing side, legacy properties are used by "info qtree" to
tweak its presentation: strings are quoted, hex8/32/64 properties are
printed in hexadecimal, and so on.  In this series, patches 7-10 add a
"human" mode to StringOutputVisitors.  This mode employs a slightly
different presentation, more suitable for human consumption, but its
output cannot be sent back to a StringInputVisitor.  The main change
is that numbers are printed in both decimal and 0x-prefixed hexadecimal.
This lets us drop hex8/32/64 property types.

Finally, patches 11-12 clean up the type names used for properties.
These are always QAPI names, so that in the future QOM introspection
can piggyback on QAPI introspection for describing property types.

Paolo Bonzini (12):
  qapi: add size parser to StringInputVisitor
  qdev: sizes are now parsed by StringInputVisitor
  qdev: remove legacy parsers for hex8/32/64
  qdev: legacy properties are now read-only
  qdev: legacy properties are just strings
  qdev: inline qdev_prop_parse
  qapi: add human mode to StringOutputVisitor
  qdev: use human mode in "info qtree"
  qdev: remove most legacy printers
  qdev: remove hex8/32/64 property types
  qdev: add enum property types to QAPI schema
  qdev: use QAPI type names for properties

 hw/audio/adlib.c                     |   2 +-
 hw/audio/cs4231a.c                   |   2 +-
 hw/audio/gus.c                       |   2 +-
 hw/audio/pcspk.c                     |   2 +-
 hw/audio/sb16.c                      |   4 +-
 hw/block/fdc.c                       |   2 +-
 hw/char/debugcon.c                   |   4 +-
 hw/char/parallel.c                   |   2 +-
 hw/char/serial-isa.c                 |   2 +-
 hw/core/qdev-properties-system.c     |  12 ++-
 hw/core/qdev-properties.c            | 204 +++--------------------------------
 hw/core/qdev.c                       |  38 +------
 hw/display/g364fb.c                  |   2 +-
 hw/display/tcx.c                     |   4 +-
 hw/dma/i82374.c                      |   2 +-
 hw/dma/sun4m_iommu.c                 |   2 +-
 hw/i386/kvm/i8254.c                  |   8 +-
 hw/ide/isa.c                         |   4 +-
 hw/ide/qdev.c                        |   2 +-
 hw/intc/i8259_common.c               |   6 +-
 hw/isa/pc87312.c                     |   2 +-
 hw/misc/applesmc.c                   |   2 +-
 hw/misc/debugexit.c                  |   4 +-
 hw/misc/eccmemctl.c                  |   2 +-
 hw/net/ne2000-isa.c                  |   2 +-
 hw/nvram/fw_cfg.c                    |   4 +-
 hw/ppc/spapr_pci.c                   |  16 +--
 hw/scsi/megasas.c                    |   2 +-
 hw/scsi/scsi-disk.c                  |   6 +-
 hw/sd/sdhci.c                        |   4 +-
 hw/timer/i8254.c                     |   2 +-
 hw/timer/m48t59.c                    |   4 +-
 hw/timer/mc146818rtc.c               |  14 +--
 hw/usb/host-libusb.c                 |   4 +-
 hw/virtio/virtio-pci.c               |   6 +-
 include/hw/block/block.h             |   6 --
 include/hw/qdev-core.h               |   1 -
 include/hw/qdev-dma.h                |   2 +-
 include/hw/qdev-properties.h         |  11 --
 include/qapi/string-output-visitor.h |   2 +-
 include/qemu-common.h                |   8 --
 include/qom/object.h                 |   3 +-
 qapi-schema.json                     |  58 ++++++++++
 qapi/string-input-visitor.c          |  24 +++++
 qapi/string-output-visitor.c         |  55 +++++++++-
 qdev-monitor.c                       |   6 +-
 qom/object.c                         |   4 +-
 tests/test-string-output-visitor.c   |   2 +-
 tests/test-visitor-serialization.c   |   2 +-
 49 files changed, 235 insertions(+), 329 deletions(-)

-- 
1.8.4.2

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

end of thread, other threads:[~2014-02-10 17:57 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-30 13:09 [Qemu-devel] [PATCH 00/12] qdev: cleanup legacy properties Paolo Bonzini
2014-01-30 13:09 ` [Qemu-devel] [PATCH 01/12] qapi: add size parser to StringInputVisitor Paolo Bonzini
2014-01-30 13:45   ` Eric Blake
2014-02-05 17:13   ` Andreas Färber
2014-02-05 17:18     ` Paolo Bonzini
2014-02-05 17:30       ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 02/12] qdev: sizes are now parsed by StringInputVisitor Paolo Bonzini
2014-01-30 13:46   ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 03/12] qdev: remove legacy parsers for hex8/32/64 Paolo Bonzini
2014-01-30 13:46   ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 04/12] qdev: legacy properties are now read-only Paolo Bonzini
2014-01-30 13:49   ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 05/12] qdev: legacy properties are just strings Paolo Bonzini
2014-01-30 13:52   ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 06/12] qdev: inline qdev_prop_parse Paolo Bonzini
2014-01-30 13:53   ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 07/12] qapi: add human mode to StringOutputVisitor Paolo Bonzini
2014-01-30 14:09   ` Eric Blake
2014-01-30 14:12     ` Paolo Bonzini
2014-01-30 14:20       ` Eric Blake
2014-02-10 17:57   ` Andreas Färber
2014-01-30 13:09 ` [Qemu-devel] [PATCH 08/12] qdev: use human mode in "info qtree" Paolo Bonzini
2014-01-30 15:01   ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 09/12] qdev: remove most legacy printers Paolo Bonzini
2014-01-30 15:03   ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 10/12] qdev: remove hex8/32/64 property types Paolo Bonzini
2014-01-30 15:17   ` Eric Blake
2014-01-30 13:09 ` [Qemu-devel] [PATCH 11/12] qdev: add enum property types to QAPI schema Paolo Bonzini
2014-01-30 15:22   ` Eric Blake
2014-01-31  8:05   ` Markus Armbruster
2014-01-31 11:26     ` Paolo Bonzini
2014-01-30 13:09 ` [Qemu-devel] [PATCH 12/12] qdev: use QAPI type names for properties Paolo Bonzini
2014-01-30 15:26   ` Eric Blake
2014-01-30 16:42 ` [Qemu-devel] [PATCH 13/12] qapi: refine human printing of sizes Paolo Bonzini
2014-01-30 20:16   ` Eric Blake
2014-02-05 11:10   ` Igor Mammedov
2014-02-05 11:12 ` [Qemu-devel] [PATCH 00/12] qdev: cleanup legacy properties Igor Mammedov
2014-02-05 16:36   ` Paolo Bonzini
2014-02-05 16:39     ` 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.