1. 22 10月, 2010 1 次提交
    • K
      ide: Handle flush failure · e2bcadad
      Kevin Wolf 提交于
      Instead of always assuming success for bdrv_aio_flush, actually do something
      with the error. This respects the werror option and accordingly ignores the
      error, reports it to the guest or stops the VM and retries after cont.
      
      Ignoring the error is trivial, obviously. For stopping the VM and retrying
      later old code can be reused, but we need to introduce a new status for "retry
      a flush". For reporting to the guest, fortunately the same action is required
      as for a failed read/write (status = DRDY | ERR, error = ABRT), so this code
      can be reused as well.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e2bcadad
  2. 27 7月, 2010 2 次提交
  3. 06 7月, 2010 2 次提交
  4. 02 7月, 2010 1 次提交
    • M
      qdev: Decouple qdev_prop_drive from DriveInfo · f8b6cc00
      Markus Armbruster 提交于
      Make the property point to BlockDriverState, cutting out the DriveInfo
      middleman.  This prepares the ground for block devices that don't have
      a DriveInfo.
      
      Currently all user-defined ones have a DriveInfo, because the only way
      to define one is -drive & friends (they go through drive_init()).
      DriveInfo is closely tied to -drive, and like -drive, it mixes
      information about host and guest part of the block device.  I'm
      working towards a new way to define block devices, with clean
      host/guest separation, and I need to get DriveInfo out of the way for
      that.
      
      Fortunately, the device models are perfectly happy with
      BlockDriverState, except for two places: ide_drive_initfn() and
      scsi_disk_initfn() need to check the DriveInfo for a serial number set
      with legacy -drive serial=...  Use drive_get_by_blockdev() there.
      
      Device model code should now use DriveInfo only when explicitly
      dealing with drives defined the old way, i.e. without -device.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f8b6cc00
  5. 04 6月, 2010 4 次提交
  6. 02 5月, 2010 1 次提交
  7. 20 2月, 2010 1 次提交
  8. 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
  9. 20 1月, 2010 1 次提交
    • G
      ide: device version property · 47c06340
      Gerd Hoffmann 提交于
      This patch adds a new property named 'ver' to ide-drive which allows to
      specify the version which the virtual disk/cdrom should report to the
      guest.  By default this is the qemu version (i.e. 0.12).  usage:
      
        -drive if=none,id=disk,file=...
        -device ide-drive,bus=ide.0,unit=0,drive=disk,ver=42
      
      You can also switch the version for all ide drives using:
      
        -global ide-drive.ver=42
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      47c06340
  10. 14 12月, 2009 1 次提交
    • I
      workaround for cmd646 bmdma register access while no dma is active · 90228ee3
      Igor V. Kovalenko 提交于
      This is a workaround only, and is a partial revert
      of a few changes to BMDMAState which removed pci_dev
      field on the way.
      
      - cmd646 pci_from_bm() expects bm->unit value to
      correspond with bm data being passed to callback
      as opaque pointer. This breaks when write to dma
      control register of second channel happens when no
      dma operation is in progress, so bm->unit is zero
      for second channel, and pci_from_bm() returns garbage
      pointer. Crash happens shortly after that while
      dereferencing that pointer.
      
      v0->v1: cleaned up dead code from pci_from_bm.
      Signed-off-by: NIgor V. Kovalenko <igor.v.kovalenko@gmail.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      90228ee3
  11. 04 12月, 2009 1 次提交
  12. 07 11月, 2009 1 次提交
  13. 28 10月, 2009 4 次提交
  14. 12 10月, 2009 2 次提交
  15. 05 10月, 2009 1 次提交
  16. 16 9月, 2009 2 次提交
  17. 04 9月, 2009 2 次提交
  18. 29 8月, 2009 1 次提交
  19. 28 8月, 2009 3 次提交