1. 11 11月, 2015 1 次提交
  2. 24 10月, 2015 1 次提交
  3. 09 10月, 2015 2 次提交
    • M
      qdev: Protect device-list-properties against broken devices · 4c315c27
      Markus Armbruster 提交于
      Several devices don't survive object_unref(object_new(T)): they crash
      or hang during cleanup, or they leave dangling pointers behind.
      
      This breaks at least device-list-properties, because
      qmp_device_list_properties() needs to create a device to find its
      properties.  Broken in commit f4eb32b5 "qmp: show QOM properties in
      device-list-properties", v2.1.  Example reproducer:
      
          $ qemu-system-aarch64 -nodefaults -display none -machine none -S -qmp stdio
          {"QMP": {"version": {"qemu": {"micro": 50, "minor": 4, "major": 2}, "package": ""}, "capabilities": []}}
          { "execute": "qmp_capabilities" }
          {"return": {}}
          { "execute": "device-list-properties", "arguments": { "typename": "pxa2xx-pcmcia" } }
          qemu-system-aarch64: /home/armbru/work/qemu/memory.c:1307: memory_region_finalize: Assertion `((&mr->subregions)->tqh_first == ((void *)0))' failed.
          Aborted (core dumped)
          [Exit 134 (SIGABRT)]
      
      Unfortunately, I can't fix the problems in these devices right now.
      Instead, add DeviceClass member cannot_destroy_with_object_finalize_yet
      to mark them:
      
      * Hang during cleanup (didn't debug, so I can't say why):
        "realview_pci", "versatile_pci".
      
      * Dangling pointer in cpus: most CPUs, plus "allwinner-a10", "digic",
        "fsl,imx25", "fsl,imx31", "xlnx,zynqmp", because they create such
        CPUs
      
      * Assert kvm_enabled(): "host-x86_64-cpu", host-i386-cpu",
        "host-powerpc64-cpu", "host-embedded-powerpc-cpu",
        "host-powerpc-cpu" (the powerpc ones can't currently reach the
        assertion, because the CPUs are only registered when KVM is enabled,
        but the assertion is arguably in the wrong place all the same)
      
      Make qmp_device_list_properties() fail cleanly when the device is so
      marked.  This improves device-list-properties from "crashes, hangs or
      leaves dangling pointers behind" to "fails".  Not a complete fix, just
      a better-than-nothing work-around.  In the above reproducer,
      device-list-properties now fails with "Can't list properties of device
      'pxa2xx-pcmcia'".
      
      This also protects -device FOO,help, which uses the same machinery
      since commit ef523587 "qdev-monitor: include QOM properties in -device
      FOO, help output", v2.2.  Example reproducer:
      
          $ qemu-system-aarch64 -machine none -device pxa2xx-pcmcia,help
      
      Before:
      
          qemu-system-aarch64: .../memory.c:1307: memory_region_finalize: Assertion `((&mr->subregions)->tqh_first == ((void *)0))' failed.
      
      After:
      
          Can't list properties of device 'pxa2xx-pcmcia'
      
      Cc: "Andreas Färber" <afaerber@suse.de>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Anthony Green <green@moxielogic.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: Jia Liu <proljc@gmail.com>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Michael Walle <michael@walle.cc>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: qemu-ppc@nongnu.org
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1443689999-12182-10-git-send-email-armbru@redhat.com>
      4c315c27
    • M
      qmp: Fix device-list-properties not to crash for abstract device · edb1523d
      Markus Armbruster 提交于
      Broken in commit f4eb32b5 "qmp: show QOM properties in
      device-list-properties", v2.1.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NAndreas Färber <afaerber@suse.de>
      Message-Id: <1443689999-12182-9-git-send-email-armbru@redhat.com>
      edb1523d
  4. 21 9月, 2015 2 次提交
  5. 09 9月, 2015 1 次提交
  6. 23 6月, 2015 6 次提交
  7. 20 6月, 2015 1 次提交
  8. 06 5月, 2015 1 次提交
    • E
      qapi: Drop inline nested struct in query-version · 4752cdbb
      Eric Blake 提交于
      A future patch will be using a 'name':{dictionary} entry in the
      QAPI schema to specify a default value for an optional argument
      (see previous commit message for more details why); but existing
      use of inline nested structs conflicts with that goal. This patch
      fixes one of only two commands relying on nested types, by
      breaking the nesting into an explicit type; it means that the
      type is now boxed instead of unboxed in C code, but the QMP wire
      format is unaffected by this change.
      
      Prefer the safer g_new0() while making the conversion.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      4752cdbb
  9. 01 4月, 2015 1 次提交
  10. 10 3月, 2015 1 次提交
  11. 16 2月, 2015 1 次提交
  12. 10 2月, 2015 1 次提交
  13. 07 2月, 2015 1 次提交
  14. 29 1月, 2015 2 次提交
  15. 22 1月, 2015 1 次提交
  16. 15 10月, 2014 1 次提交
    • G
      qmp: Print descriptions of object properties · 07d09c58
      Gonglei 提交于
      Add a new "description" field to DevicePropertyInfo.
      The descriptions can serve as documentation in the code,
      and they can be used to provide better help. For example:
      
      $./qemu-system-x86_64 -device virtio-blk-pci,?
      
      Before this patch:
      
      virtio-blk-pci.iothread=link<iothread>
      virtio-blk-pci.x-data-plane=bool
      virtio-blk-pci.scsi=bool
      virtio-blk-pci.config-wce=bool
      virtio-blk-pci.serial=str
      virtio-blk-pci.secs=uint32
      virtio-blk-pci.heads=uint32
      virtio-blk-pci.cyls=uint32
      virtio-blk-pci.discard_granularity=uint32
      virtio-blk-pci.bootindex=int32
      virtio-blk-pci.opt_io_size=uint32
      virtio-blk-pci.min_io_size=uint16
      virtio-blk-pci.physical_block_size=uint16
      virtio-blk-pci.logical_block_size=uint16
      virtio-blk-pci.drive=str
      virtio-blk-pci.virtio-backend=child<virtio-blk-device>
      virtio-blk-pci.command_serr_enable=on/off
      virtio-blk-pci.multifunction=on/off
      virtio-blk-pci.rombar=uint32
      virtio-blk-pci.romfile=str
      virtio-blk-pci.addr=pci-devfn
      virtio-blk-pci.event_idx=on/off
      virtio-blk-pci.indirect_desc=on/off
      virtio-blk-pci.vectors=uint32
      virtio-blk-pci.ioeventfd=on/off
      virtio-blk-pci.class=uint32
      
      After:
      
      virtio-blk-pci.iothread=link<iothread>
      virtio-blk-pci.x-data-plane=bool (on/off)
      virtio-blk-pci.scsi=bool (on/off)
      virtio-blk-pci.config-wce=bool (on/off)
      virtio-blk-pci.serial=str
      virtio-blk-pci.secs=uint32
      virtio-blk-pci.heads=uint32
      virtio-blk-pci.cyls=uint32
      virtio-blk-pci.discard_granularity=uint32
      virtio-blk-pci.bootindex=int32
      virtio-blk-pci.opt_io_size=uint32
      virtio-blk-pci.min_io_size=uint16
      virtio-blk-pci.physical_block_size=uint16 (A power of two between 512 and 32768)
      virtio-blk-pci.logical_block_size=uint16 (A power of two between 512 and 32768)
      virtio-blk-pci.drive=str (ID of a drive to use as a backend)
      virtio-blk-pci.virtio-backend=child<virtio-blk-device>
      virtio-blk-pci.command_serr_enable=bool (on/off)
      virtio-blk-pci.multifunction=bool (on/off)
      virtio-blk-pci.rombar=uint32
      virtio-blk-pci.romfile=str
      virtio-blk-pci.addr=int32 (Slot and optional function number, example: 06.0 or 06)
      virtio-blk-pci.event_idx=bool (on/off)
      virtio-blk-pci.indirect_desc=bool (on/off)
      virtio-blk-pci.vectors=uint32
      virtio-blk-pci.ioeventfd=bool (on/off)
      virtio-blk-pci.class=uint32
      
      Cc: Markus Armbruster <armbru@redhat.com>
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      07d09c58
  17. 15 8月, 2014 1 次提交
  18. 07 7月, 2014 1 次提交
    • S
      qmp: show QOM properties in device-list-properties · f4eb32b5
      Stefan Hajnoczi 提交于
      Devices can use a mix of qdev and QOM properties.  Currently only the
      qdev properties are displayed by device-list-properties.
      
      This patch extends the property enumeration algorithm to also display
      QOM properties (excluding the implicit "type", "realized",
      "hotpluggable", and "parent_bus" properties).
      
      When a qdev property exists, use the qdev type name to preserve
      backwards compatibility.  QOM type names can be different for bool (qdev
      on/off) and str (used by qdev pointers).
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      f4eb32b5
  19. 19 6月, 2014 4 次提交
  20. 09 5月, 2014 2 次提交
  21. 08 5月, 2014 1 次提交
  22. 06 5月, 2014 1 次提交
  23. 25 4月, 2014 2 次提交
  24. 13 3月, 2014 1 次提交
  25. 02 3月, 2014 1 次提交
  26. 29 1月, 2014 2 次提交