1. 07 8月, 2012 1 次提交
  2. 17 7月, 2012 1 次提交
  3. 20 6月, 2012 1 次提交
  4. 07 6月, 2012 4 次提交
  5. 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
  6. 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
  7. 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
  8. 13 3月, 2012 2 次提交
  9. 27 2月, 2012 1 次提交
  10. 22 2月, 2012 1 次提交
  11. 15 2月, 2012 1 次提交
  12. 10 2月, 2012 2 次提交
    • G
      usb: Set USBEndpoint in usb_packet_setup(). · 079d0b7f
      Gerd Hoffmann 提交于
      With the separation of the device lookup (via usb_find_device) and
      packet processing we can lookup device and endpoint before setting up
      the usb packet.  So we can initialize USBPacket->ep early and keep it
      valid for the whole lifecycle of the USBPacket.  Also the devaddr and
      devep fields are not needed any more.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      079d0b7f
    • G
      usb: kill handle_packet callback · 7f74a56b
      Gerd Hoffmann 提交于
      All drivers except usb-hub use usb_generic_handle_packet.  The only
      reason the usb hub has its own function is that it used to be called
      with packets which are intended for downstream devices.  With the new,
      separate device lookup step this doesn't happen any more, so the need
      for a different handle_packet callback is gone.
      
      So we can kill the handle_packet callback and just call
      usb_generic_handle_packet directly.  The special hub handling in
      usb_handle_packet() can go away for the same reason.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      7f74a56b
  13. 04 2月, 2012 2 次提交
    • A
      qdev: register all types natively through QEMU Object Model · 39bffca2
      Anthony Liguori 提交于
      This was done in a mostly automated fashion.  I did it in three steps and then
      rebased it into a single step which avoids repeatedly touching every file in
      the tree.
      
      The first step was a sed-based addition of the parent type to the subclass
      registration functions.
      
      The second step was another sed-based removal of subclass registration functions
      while also adding virtual functions from the base class into a class_init
      function as appropriate.
      
      Finally, a python script was used to convert the DeviceInfo structures and
      qdev_register_subclass functions to TypeInfo structures, class_init functions,
      and type_register_static calls.
      
      We are almost fully converted to QOM after this commit.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      39bffca2
    • A
      usb: separate out legacy usb registration from type registration · ba02430f
      Anthony Liguori 提交于
      Type registeration is going to get turned into a QOM call so decouple the
      legacy support.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ba02430f
  14. 28 1月, 2012 1 次提交
  15. 13 1月, 2012 1 次提交
  16. 06 1月, 2012 2 次提交
    • M
      scsi virtio-blk usb-msd: Clean up device init error messages · 6a84cb1f
      Markus Armbruster 提交于
      Replace
      
          error_report("DEVICE-NAME: MESSAGE");
      
      by just
      
          error_report("MESSAGE");
      
      in block device init functions.
      
      DEVICE-NAME is bogus in some cases: it's "scsi-disk" for device
      scsi-hd and scsi-cd, "virtio-blk-pci" for virtio-blk-s390, and
      "usb-msd" for usb-storage.
      
      There is no real need to put a device name in the message, because
      error_report() points to the offending command line option already:
      
      $ qemu-system-x86_64 --nodefaults --enable-kvm -vnc :0 -S -monitor stdio -usb -device virtio-blk-pci
      upstream-qemu: -device virtio-blk-pci: virtio-blk-pci: drive property not set
      upstream-qemu: -device virtio-blk-pci: Device 'virtio-blk-pci' could not be initialized
      
      And for a monitor command, it's obvious anyway:
      
      $ qemu-system-x86_64 --nodefaults --enable-kvm -vnc :0 -S -monitor stdio -usb
      (qemu) device_add virtio-blk-pci
      virtio-blk-pci: drive property not set
      Device 'virtio-blk-pci' could not be initialized
      Reported-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      6a84cb1f
    • G
      usb-storage: cancel I/O on reset · 24a5bbe1
      Gerd Hoffmann 提交于
      When resetting the usb-storage device we'll have to carefully cancel
      and clear any requests which might be in flight, otherwise we'll confuse
      the state machine.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      24a5bbe1
  17. 22 11月, 2011 1 次提交
  18. 21 11月, 2011 5 次提交
  19. 01 11月, 2011 1 次提交
  20. 29 10月, 2011 2 次提交
  21. 13 10月, 2011 1 次提交
  22. 06 9月, 2011 1 次提交
  23. 12 8月, 2011 1 次提交
  24. 04 8月, 2011 2 次提交
    • G
      usb-storage: iovec support · 29c74f76
      Gerd Hoffmann 提交于
      Add full iovec support to usb-storage.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      29c74f76
    • G
      usb: use iovecs in USBPacket · 4f4321c1
      Gerd Hoffmann 提交于
      Zap data pointer from USBPacket, add a QEMUIOVector instead.
      Add a bunch of helper functions to manage USBPacket data.
      Switch over users to the new interface.
      
      Note that USBPacket->len was used for two purposes:  First to
      pass in the buffer size and second to return the number of
      transfered bytes or the status code on async transfers.  There
      is a new result variable for the latter.  A new status code
      was added to catch uninitialized result.
      
      Nobody creates iovecs with more than one element (yet).
      Some users are (temporarely) limited to iovecs with a single
      element to keep the patch size as small as possible.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      4f4321c1
  25. 24 7月, 2011 1 次提交
  26. 20 7月, 2011 1 次提交