summaryrefslogtreecommitdiff
path: root/hw/core/qdev-properties.c
AgeCommit message (Collapse)AuthorFilesLines
2014-02-14qdev: Use QAPI type names for propertiesPaolo Bonzini1-7/+11
Use "drive", "chr", etc. only for legacy_name (which shows up in -device foo,? output). Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Add enum property types to QAPI schemaPaolo Bonzini1-17/+3
Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14block: Handle "rechs" and "large" translation optionsPaolo Bonzini1-3/+5
Sure, CHS translation is an obscure topic, and legacy options for hard-disk geometries are obscure as well. But since QEMU does nothing with it except telling the BIOS, and since there "large" and "rechs" are listed in the enums, parsing them seems to be the bare minimum. Acked-by: Stefan Hajnoczi <stefanha@gmail.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Remove hex8/32/64 property typesPaolo Bonzini1-27/+0
Replace them with uint8/32/64. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Remove most legacy printersPaolo Bonzini1-60/+0
Their functionality is either aesthetic only (e.g. on/off vs. true/false) or obtained by the "human mode" of StringOutputVisitor. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Inline qdev_prop_parse()Paolo Bonzini1-7/+1
Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Legacy properties are now read-onlyPaolo Bonzini1-9/+1
Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Remove legacy parsers for hex8/32/64Paolo Bonzini1-54/+0
The hexNN property types have not been accepting values not prefixed by "0x" since QEMU 1.2. Parse those values as decimals now. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-02-14qdev: Sizes are now parsed by StringInputVisitorPaolo Bonzini1-11/+0
Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-01-06hw: Remove assert_no_error usagesPeter Crosthwaite1-30/+10
Replace assert_no_error() usages with the error_abort system. &error_abort is passed into API calls to signal to the Error sub-system that any errors are fatal. Removes need for caller assertions. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2013-07-31qdev: Use clz in print_sizeRichard Henderson1-7/+13
We can compute a floor log2 value with clz rather than a division loop. Signed-off-by: Richard Henderson <rth@twiddle.net> Message-id: 1375208443-17288-3-git-send-email-rth@twiddle.net Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-31qdev: Fix 32-bit compilation in print_sizeRichard Henderson1-1/+1
Signed-off-by: Richard Henderson <rth@twiddle.net> Message-id: 1375208443-17288-2-git-send-email-rth@twiddle.net Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29qdev: Add SIZE type to qdev propertiesVasilis Liaskovitis1-0/+55
This patch adds a 'SIZE' type property to qdev. Signed-off-by: Ian Molton <ian.molton@collabora.co.uk> Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 1375109277-25561-7-git-send-email-imammedo@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29hw: import bitmap operations in qdev-core headerMarcel Apfelbaum1-6/+7
Made small tweaks in code to prevent compilation issues when importing qemu/bitmap.h in qdev-core Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Message-id: 1375107465-25767-2-git-send-email-marcel.a@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-06qdev: Introduce qdev_prop_set_globals_for_type()Andreas Färber1-11/+25
Reuse it in qdev_prop_set_globals(). Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> [AF: Renamed from qdev_prop_set_custom_globals()] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-05-06qdev: Let qdev_prop_parse() pass through ErrorAndreas Färber1-14/+11
Move error reporting to callers. Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-04-16qdev: Add qdev property for bool typeIgor Mammedov1-0/+33
Signed-off-by: Igor Mammedov <imammedo@redhat.com> [AF: Use new qdev_prop_set_after_realize()] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-04-15sysemu: avoid proliferation of include/ subdirectoriesPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move target-independent files to subdirectoriesPaolo Bonzini1-0/+1092
This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>