1. 23 9月, 2014 1 次提交
  2. 22 9月, 2014 1 次提交
    • M
      usb-storage: Fix how legacy init handles option ID clash · 31376776
      Markus Armbruster 提交于
      usb_msd_init() calls qemu_opts_create() with a made-up ID and false
      fail_if_exists.  If the ID already exists, it happily messes up those
      options, then fails drive_new(), because the BlockDriverState with
      that ID already exists, too.
      
      Reproducer: -drive if=none,id=usb0,format=raw -usbdevice disk:tmp.qcow2
      
      Pass true fail_if_exists to qemu_opts_create(), and if it fails, try
      the next made-up ID.
      
      The reproducer now succeeds, and creates an usb-storage device with ID
      usb1.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      31376776
  3. 16 6月, 2014 1 次提交
  4. 14 5月, 2014 1 次提交
  5. 18 2月, 2014 1 次提交
  6. 06 11月, 2013 1 次提交
  7. 31 8月, 2013 1 次提交
  8. 29 7月, 2013 1 次提交
  9. 23 7月, 2013 1 次提交
  10. 24 6月, 2013 1 次提交
  11. 04 5月, 2013 1 次提交
  12. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  13. 06 4月, 2013 1 次提交
  14. 19 2月, 2013 1 次提交
  15. 22 1月, 2013 2 次提交
  16. 17 1月, 2013 1 次提交
  17. 11 1月, 2013 1 次提交
    • A
      Make all static TypeInfos const · 8c43a6f0
      Andreas Färber 提交于
      Since 39bffca2 (qdev: register all
      types natively through QEMU Object Model), TypeInfo as used in
      the common, non-iterative pattern is no longer amended with information
      and should therefore be const.
      
      Fix the documented QOM examples:
      
       sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h
      
      Since frequently the wrong examples are being copied by contributors of
      new devices, fix all types in the tree:
      
       sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c
       sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c
      
      This also avoids to piggy-back these changes onto real functional
      changes or other refactorings.
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8c43a6f0
  18. 19 12月, 2012 4 次提交
  19. 09 11月, 2012 1 次提交
    • H
      usb: split packet result into actual_length + status · 9a77a0f5
      Hans de Goede 提交于
      Since with the ehci and xhci controllers a single packet can be larger
      then maxpacketsize, it is possible for the result of a single packet
      to be both having transferred some data as well as the transfer to have
      an error.
      
      An example would be an input transfer from a bulk endpoint successfully
      receiving 1 or more maxpacketsize packets from the device, followed
      by a packet signalling halt.
      
      While already touching all the devices and controllers handle_packet /
      handle_data / handle_control code, also change the return type of
      these functions to void, solely storing the status in the packet. To
      make the code paths for regular versus async packet handling more
      uniform.
      
      This patch unfortunately is somewhat invasive, since makeing the qemu
      usb core deal with this requires changes everywhere. This patch only
      prepares the usb core for this, all the hcd / device changes are done
      in such a way that there are no functional changes.
      
      This patch has been tested with uhci and ehci hcds, together with usb-audio,
      usb-hid and usb-storage devices, as well as with usb-redir redirection
      with a wide variety of real devices.
      
      Note that there is usually no need to directly set packet->actual_length
      form devices handle_data callback, as that is done by usb_packet_copy()
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      9a77a0f5
  20. 11 9月, 2012 1 次提交
  21. 07 8月, 2012 2 次提交
  22. 17 7月, 2012 1 次提交
  23. 20 6月, 2012 1 次提交
  24. 07 6月, 2012 4 次提交
  25. 05 6月, 2012 1 次提交
    • L
      qemu-option: qemu_opts_create(): use error_set() · 8be7e7e4
      Luiz Capitulino 提交于
      This commit converts qemu_opts_create() from qerror_report() to
      error_set().
      
      Currently, most calls to qemu_opts_create() can't fail, so most
      callers don't need any changes.
      
      The two cases where code checks for qemu_opts_create() erros are:
      
       1. Initialization code in vl.c. All of them print their own
          error messages directly to stderr, no need to pass the Error
          object
      
       2. The functions opts_parse(), qemu_opts_from_qdict() and
          qemu_chr_parse_compat() make use of the error information and
          they can be called from HMP or QMP. In this case, to allow for
          incremental conversion, we propagate the error up using
          qerror_report_err(), which keeps the QError semantics
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Reviewed-By: NLaszlo Ersek <lersek@redhat.com>
      8be7e7e4
  26. 26 4月, 2012 2 次提交
    • G
      usb: add serial number generator · 9d55d1ad
      Gerd Hoffmann 提交于
      This patch adds a function which creates unique serial numbers for usb
      devices and puts it into use.  Windows guests tend to become unhappy if
      they find two identical usb devices in the system.  Effects range from
      non-functional devices (with yellow exclamation mark in device manager)
      to BSODs.  Handing out unique serial numbers to devices fixes this.
      
      With this patch applied almost all emulated devices get a generated,
      unique serial number.  There are two exceptions:
      
       * usb-storage devices will prefer a user-specified serial number
         and will only get a generated number in case the serial property
         is unset.
       * usb-hid devices keep the fixed serial number "42" as it is used
         to signal "remote wakeup actually works".
         See commit 7b074a22Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      9d55d1ad
    • G
      usb-storage: fix request canceling · 6d7aeeeb
      Gerd Hoffmann 提交于
      Little fix for usb packet handling on i/o cancelation.  The
      usb packet pointer (s->packet) is cleared at the wrong place:
      The scsi request cancel handler does it.  When a usb packet
      is canceled the usb-storage emulation canceles the scsi request
      if present.  In most cases there is one, so usually s->packet
      is cleared as needed even with the code sitting at the wrong
      place.
      
      If there is no scsi request in flight s->packet is not cleared
      though.  The usb-storage emulation will then try to complete an
      usb packet which is not in flight any more and thereby trigger
      an assert() in the usb core.
      
      Fix this by clearing s->packet at the correct place, which is
      the usb packet cancel header.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      6d7aeeeb
  27. 10 4月, 2012 1 次提交
    • L
      qdev: qdev_unplug(): use error_set() · 56f9107e
      Luiz Capitulino 提交于
      It currently uses qerror_report(), but next commit will convert
      the drive_del command to the QAPI and this requires using
      error_set().
      
      One particularity of qerror_report() is that it knows when it's
      running on monitor context or command-line context and prints the
      error message accordingly. error_set() doesn't do this, so we
      have to be careful not to drop error messages.
      
      qdev_unplug() has three kinds of usages:
      
       1. It's called when hot adding a device fails, to undo anything
          that has been done before hitting the error
      
       2. It's called by function monitor functions like device_del(),
          to unplug a device
      
       3. It's used by xen_platform.c in a way that doesn't _seem_ to
          be in monitor context
      
      Only item 2 can print an error message to the user, this commit
      maintains that.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      56f9107e
  28. 13 3月, 2012 2 次提交
  29. 27 2月, 2012 1 次提交
  30. 22 2月, 2012 1 次提交