1. 02 7月, 2010 2 次提交
    • M
      blockdev: Clean up automatic drive deletion · 14bafc54
      Markus Armbruster 提交于
      We automatically delete blockdev host parts on unplug of the guest
      device.  Too much magic, but we can't change that now.
      
      The delete happens early in the guest device teardown, before the
      connection to the host part is severed.  Thus, the guest part's
      pointer to the host part dangles for a brief time.  No actual harm
      comes from this, but we'll catch such dangling pointers a few commits
      down the road.  Clean up the dangling pointers by delaying the
      automatic deletion until the guest part's pointer is gone.
      
      Device usb-storage deliberately makes two qdev properties refer to the
      same drive, because it automatically creates a second device.  Again,
      too much magic we can't change now.  Multiple references worked okay
      before, but now free_drive() dies for the second one.  Zap the extra
      reference.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      14bafc54
    • M
      scsi: scsi_bus_legacy_handle_cmdline() can fail, fix callers · fa66b909
      Markus Armbruster 提交于
      None of its callers checks for failure.  scsi_hot_add() can crash
      because of that:
      
      (qemu) drive_add 4 if=scsi,format=host_device,file=/dev/sg1
      scsi-generic: scsi generic interface too old
      Segmentation fault (core dumped)
      
      Fix all callers, not just scsi_hot_add().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      fa66b909
  2. 04 6月, 2010 2 次提交
  3. 01 4月, 2010 1 次提交
    • M
      usb: class specific interface requests · f3571b1a
      Max Reitz 提交于
      Mass Storage Reset and Get Max LUN are class specific requests, but
      they were not marked as such in hw/usb-msd.c, moved therefore
      ClassInterfaceRequest and ClassInterfaceOutRequest from hw/usb-net.c
      to hw/usb.h.
      Furthermore there was a problem in hw/usb-ohci.c when using DEBUG
      concerning systems where size_t is a 32 bit integer (printf resulted
      in a segmentation fault).
      Signed-off-by: NMax Reitz <max@tyndur.org>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      f3571b1a
  4. 18 3月, 2010 1 次提交
  5. 16 3月, 2010 2 次提交
    • M
      error: Replace qemu_error() by error_report() · 1ecda02b
      Markus Armbruster 提交于
      error_report() terminates the message with a newline.  Strip it it
      from its arguments.
      
      This fixes a few error messages lacking a newline:
      net_handle_fd_param()'s "No file descriptor named %s found", and
      tap_open()'s "vnet_hdr=1 requested, but no kernel support for
      IFF_VNET_HDR available" (all three versions).
      
      There's one place that passes arguments without newlines
      intentionally: load_vmstate().  Fix it up.
      1ecda02b
    • M
      block: Simplify usb_msd_initfn() test for "can read bdrv key" · a4426488
      Markus Armbruster 提交于
      The old test assumes that "hotplugged" implies "we have a current
      monitor for reading the key".  This is in fact true, but it's not
      obviously true.
      
      Aside: if it were false, we could pass a null pointer to
      monitor_read_bdrv_key_start(), which would then crash.
      
      The previous commit permits us to check for "we have a current
      monitor" directly, so do that.
      a4426488
  6. 25 2月, 2010 1 次提交
    • P
      Fix -usbdevice crash · d44168ff
      Paul Brook 提交于
      If -usbdevice is used on a machine with no USB busses, usb_create
      will fail and return NULL.  Patch below handles this failure gracefully
      rather than crashing when we try to init the device.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      d44168ff
  7. 11 2月, 2010 1 次提交
    • C
      block: add topology qdev properties · 428c149b
      Christoph Hellwig 提交于
      Add three new qdev properties to export block topology information to
      the guest.  This is needed to get optimal I/O alignment for RAID arrays
      or SSDs.
      
      The options are:
      
       - physical_block_size to specify the physical block size of the device,
         this is going to increase from 512 bytes to 4096 kilobytes for many
         modern storage devices
       - min_io_size to specify the minimal I/O size without performance impact,
         this is typically set to the RAID chunk size for arrays.
       - opt_io_size to specify the optimal sustained I/O size, this is
         typically the RAID stripe width for arrays.
      
      I decided to not auto-probe these values from blkid which might easily
      be possible as I don't know how to deal with these issues on migration.
      
      Note that we specificly only set the physical_block_size, and not the
      logial one which is the unit all I/O is described in.  The reason for
      that is that IDE does not support increasing the logical block size and
      at last for now I want to stick to one meachnisms in queue and allow
      for easy switching of transports for a given backing image which would
      not be possible if scsi and virtio use real 4k sectors, while ide only
      uses the physical block exponent.
      
      To make this more common for the different block drivers introduce a
      new BlockConf structure holding all common block properties and a
      DEFINE_BLOCK_PROPERTIES macro to add them all together, mirroring
      what is done for network drivers.  Also switch over all block drivers
      to use it, except for the floppy driver which has weird driveA/driveB
      properties and probably won't require any advanced block options ever.
      
      Example usage for a virtio device with 4k physical block size and
      8k optimal I/O size:
      
        -drive file=scratch.img,media=disk,cache=none,id=scratch \
        -device virtio-blk-pci,drive=scratch,physical_block_size=4096,opt_io_size=8192
      
      aliguori: updated patch to take into account BLOCK events
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      428c149b
  8. 12 12月, 2009 2 次提交
  9. 09 11月, 2009 1 次提交
  10. 30 10月, 2009 1 次提交
  11. 07 10月, 2009 1 次提交
  12. 05 10月, 2009 4 次提交
  13. 10 9月, 2009 3 次提交
  14. 14 5月, 2009 1 次提交
  15. 06 3月, 2009 2 次提交
  16. 06 2月, 2009 1 次提交
  17. 22 8月, 2008 1 次提交
  18. 10 12月, 2007 1 次提交
  19. 18 11月, 2007 1 次提交
  20. 17 9月, 2007 2 次提交
  21. 30 4月, 2007 1 次提交
  22. 01 4月, 2007 1 次提交
  23. 29 8月, 2006 1 次提交
  24. 19 8月, 2006 1 次提交
  25. 12 8月, 2006 1 次提交
  26. 20 7月, 2006 1 次提交
  27. 27 6月, 2006 1 次提交
  28. 27 5月, 2006 1 次提交
  29. 26 5月, 2006 1 次提交