1. 07 7月, 2015 1 次提交
  2. 26 6月, 2015 2 次提交
    • P
      qdev-properties-system: Improve error message for drive assignment conflict · 62f7dbde
      Peter Maydell 提交于
      If the user forgot if=none on their drive specification they're likely
      to get an error message because the drive is assigned once automatically
      by QEMU and once by the manual id=/drive= user command line specification.
      Improve the error message produced in this case to explicitly guide the
      user towards if=none.
      
      We rephrase the "drive conflict but not for an if=something" error as
      well to keep the wording in line.
      
      The two cases that change are:
      
      (1) Drive specified as to be auto-connected and also manually connected
      (and the board does handle this if= type):
      
        qemu-system-x86_64 -nodefaults -display none \
           -drive if=scsi,file=tmp.qcow2,id=foo -device ide-hd,drive=foo
      
      Previously:
        qemu-system-x86_64: -device ide-hd,drive=foo: Property 'ide-hd.drive'
        can't take value 'foo', it's in use
      
      Now:
        qemu-system-x86_64: -device ide-hd,drive=foo: Drive 'foo' is already in
        use because it has been automatically connected to another device (did
        you need 'if=none' in the drive options?)
      
      (2) Drive specified to be manually connected in two different ways:
      
        qemu-system-x86_64 -nodefaults -display none \
         -drive if=none,file=tmp.qcow2,id=foo -device ide-hd,drive=foo \
         -device ide-hd,drive=foo
      
      Previously:
        qemu-system-x86_64: -device ide-hd,drive=foo: Property 'ide-hd.drive'
        can't take value 'foo', it's in use
      
      Now:
        qemu-system-x86_64: -device ide-hd,drive=foo: Drive 'foo' is already in
        use by another device
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1435068107-12594-3-git-send-email-peter.maydell@linaro.org
      62f7dbde
    • P
      qdev-properties-system: Change set_pointer's parse callback to use Error · f1fb9f0d
      Peter Maydell 提交于
      Instead of having set_pointer() call a parse callback which returns
      an error number that we then convert to an Error string with
      error_set_from_qdev_prop_error(), make the parse callback take an
      Error** and set the error itself. This will allow parse routines
      to provide more helpful error messages than the generic ones.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1435068107-12594-2-git-send-email-peter.maydell@linaro.org
      f1fb9f0d
  3. 24 6月, 2015 1 次提交
  4. 23 6月, 2015 4 次提交
  5. 20 6月, 2015 1 次提交
  6. 19 6月, 2015 2 次提交
  7. 11 6月, 2015 1 次提交
  8. 09 6月, 2015 2 次提交
  9. 04 6月, 2015 1 次提交
  10. 01 6月, 2015 1 次提交
  11. 08 5月, 2015 1 次提交
  12. 28 4月, 2015 2 次提交
  13. 26 3月, 2015 1 次提交
  14. 19 3月, 2015 1 次提交
  15. 17 3月, 2015 1 次提交
  16. 16 3月, 2015 1 次提交
  17. 12 3月, 2015 6 次提交
  18. 10 3月, 2015 4 次提交
  19. 27 2月, 2015 1 次提交
    • D
      Create specific config option for "platform-bus" · 22965942
      David Gibson 提交于
      Currently the "platform-bus" device is included for all softmmu builds.
      This bridge is intended for use on any platforms that require dynamic
      creation of sysbus devices.  However, at present it is used only for the
      PPC E500 target, with plans for the ARM "virt" target in the immediate
      future.
      
      To avoid a not-very-useful entry appearing in "qemu -device ?" output on
      other targets, this patch makes a specific config option for platform-bus
      and enables it (for now) only on ppc configurations which include E500
      and on ARM (which always includes the "virt" target).
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Message-Id: <1425017077-18487-3-git-send-email-david@gibson.dropbear.id.au>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      22965942
  20. 26 2月, 2015 1 次提交
    • M
      qdev: Don't exit when running into bad -global · 25f8dd96
      Markus Armbruster 提交于
      -global lets you set a nice booby-trap for yourself:
      
          $ qemu-system-x86_64 -nodefaults -S -display none -usb -monitor stdio -global usb-mouse.usb_version=l
          QEMU 2.1.94 monitor - type 'help' for more information
          (qemu) device_add usb-mouse
          Parameter 'usb_version' expects an int64 value or range
          $ echo $?
          1
      
      Not nice.  Until commit 31962700 we even abort()ed.
      
      The same error triggers if you manage to screw up a machine type's
      compat_props.  To demonstrate, change HW_COMPAT_2_1's entry to
      
                  .driver   = "usb-mouse",\
                  .property = "usb_version",\
                  .value    = "1", \
      
      Then run
      
          $ qemu-system-x86_64 -usb -M pc-i440fx-2.1 -device usb-mouse
          upstream-qemu: -device usb-mouse: Parameter 'usb_version' expects an int64 value or range
          $ echo $?
          1
      
      One of our creatively cruel error messages.
      
      Since this is actually a coding error, we *should* abort() here.
      Replace the error by an assertion failure in this case.
      
      But turn the fatal error into a mere warning when the faulty
      GlobalProperty comes from the user.  Looks like this:
      
          $ qemu-system-x86_64 -nodefaults -S -display none -usb -monitor stdio -global usb-mouse.usb_version=l
          QEMU 2.1.94 monitor - type 'help' for more information
          (qemu) device_add usb-mouse
          Warning: global usb-mouse.usb_version=l ignored (Parameter 'usb_version' expects an int64 value or range)
          (qemu)
      
      This is consistent with how we handle similarly unusable -global in
      qdev_prop_check_globals().
      
      You could argue that the error should make device_add fail.  Would be
      harder, because we're running within TypeInfo's instance_post_init()
      method device_post_init(), which can't fail.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      
      25f8dd96
  21. 18 2月, 2015 1 次提交
    • M
      hmp: Name HMP info handler functions hmp_info_SUBCOMMAND() · 1ce6be24
      Markus Armbruster 提交于
      Some are called do_info_SUBCOMMAND() (old ones, usually), some
      hmp_info_SUBCOMMAND(), some SUBCOMMAND_info(), sometimes SUBCOMMAND
      pointlessly differs in spelling.
      
      Normalize to hmp_info_SUBCOMMAND(), where SUBCOMMAND is exactly the
      subcommand name with '-' replaced by '_'.
      
      Exceptions:
      
      * sun4m_irq_info(), sun4m_pic_info() renamed to sun4m_hmp_info_irq(),
        sun4m_hmp_info_pic().
      
      * lm32_irq_info(), lm32_pic_info() renamed to lm32_hmp_info_irq(),
        lm32_hmp_info_pic().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      1ce6be24
  22. 16 2月, 2015 2 次提交
  23. 12 2月, 2015 1 次提交
    • G
      qdev: support to get a device firmware path directly · 0be63901
      Gonglei 提交于
      commit 6b1566cb (qdev: Introduce FWPathProvider interface) did a
      good job for supproting to get firmware path on some different
      architectures.
      
      Moreover further more, we can use the interface to get firmware
      path name for a device which isn't attached a specific bus,
      such as virtio-bus, scsi-bus etc.
      
      When the device (such as vhost-scsi) realize the TYPE_FW_PATH_PROVIDER
      interface, we should introduce a new function to get the correct firmware
      path name for it.
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0be63901
  24. 10 2月, 2015 1 次提交