1. 17 12月, 2010 6 次提交
  2. 29 11月, 2010 2 次提交
  3. 04 11月, 2010 1 次提交
  4. 22 10月, 2010 3 次提交
    • 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
    • K
      ide: Factor ide_flush_cache out · 6bcb1a79
      Kevin Wolf 提交于
      The next patch reuses this code, so put it in its own function.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      6bcb1a79
    • C
      ide: set WCACHE supported in IDENTIFY data · a58b8d54
      Christoph Hellwig 提交于
      ATA does not only have the WCACHE enabled bit in identify word 85, but also
      a WCACHE supported bit in word 82.  While the Linux kernel is fine with the
      latter at least hdparm also needs the former before correctly displaying
      the cache settings.  There's also a non-zero chance other operating systems
      are more picky in their volatile write cache detection.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      a58b8d54
  5. 21 9月, 2010 1 次提交
    • C
      ide: propagate the required alignment · 1b2adf28
      Christoph Hellwig 提交于
      IDE is a bit ugly in this respect.  For one it doesn't really keep track
      of a sector size - most of the protocol is in units of 512 bytes, and we
      assume 2048 bytes for CDROMs which is correct most of the time.
      
      Second IDE allocates an I/O buffer long before we know if we're dealing
      with a CDROM or not, so increase the alignment for the io_buffer
      unconditionally.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      1b2adf28
  6. 08 9月, 2010 1 次提交
  7. 24 8月, 2010 1 次提交
    • B
      Rearrange block headers · 2446333c
      Blue Swirl 提交于
      Changing block.h or blockdev.h resulted in recompiling most objects.
      
      Move DriveInfo typedef and BlockInterfaceType enum definitions
      to qemu-common.h and rearrange blockdev.h use to decrease churn.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      2446333c
  8. 27 7月, 2010 3 次提交
  9. 26 7月, 2010 1 次提交
    • A
      ide/atapi: add support for GET EVENT STATUS NOTIFICATION · 253cb7b9
      Aurelien Jarno 提交于
      The GET EVENT STATUS NOTIFICATION is a mandatory command according
      to MMC-3, even if event status notification is not supported.
      
      This patch adds support for this command. It returns NEA ("No Event
      Available") with an empty "Supported Event Classes" to show that it
      doesn't event support status notification. If asychronous operation is
      requested, which requires NCQ support, it returns an error according
      to the specifications.
      
      This fixes HAL support on FreeBSD and derivatives, which fill up the
      logs every second with:
      
        acd0: FAILURE - unknown CMD (0x03) ILLEGAL REQUEST asc=0x20 ascq=0x00
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      253cb7b9
  10. 13 7月, 2010 1 次提交
  11. 06 7月, 2010 4 次提交
  12. 02 7月, 2010 2 次提交
    • M
      block: Fix virtual media change for if=none · 7d0d6950
      Markus Armbruster 提交于
      BlockDriverState member removable controls whether virtual media
      change (monitor commands change, eject) is allowed.  It is set when
      the "type hint" is BDRV_TYPE_CDROM or BDRV_TYPE_FLOPPY.
      
      The type hint is only set by drive_init().  It sets BDRV_TYPE_FLOPPY
      for if=floppy.  It sets BDRV_TYPE_CDROM for media=cdrom and if=ide,
      scsi, xen, or none.
      
      if=ide and if=scsi work, because the type hint makes it a CD-ROM.
      if=xen likewise, I think.
      
      For the same reason, if=none works when it's used by ide-drive or
      scsi-disk.  For other guest devices, there are problems:
      
      * fdc: you can't change virtual media
      
          $ qemu [...] -drive if=none,id=foo,... -global isa-fdc.driveA=foo
          QEMU 0.12.50 monitor - type 'help' for more information
          (qemu) eject foo
          Device 'foo' is not removable
      
        unless you add media=cdrom, but that makes it readonly.
      
      * virtio: if you add media=cdrom, you can change virtual media.  If
        you eject, the guest gets I/O errors.  If you change, the guest sees
        the drive's contents suddenly change.
      
      * scsi-generic: if you add media=cdrom, you can change virtual media.
        I didn't test what that does to the guest or the physical device,
        but it can't be pretty.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      7d0d6950
    • 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
  13. 15 6月, 2010 1 次提交
  14. 04 6月, 2010 6 次提交
  15. 17 5月, 2010 1 次提交
    • K
      ide: Fix ide_dma_cancel · 38d8dfa1
      Kevin Wolf 提交于
      When cancelling a request, bdrv_aio_cancel may decide that it waits for
      completion of a request rather than for cancellation. IDE therefore can't
      abandon its DMA status before calling bdrv_aio_cancel; otherwise the callback
      of a completed request would use invalid data.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      38d8dfa1
  16. 15 5月, 2010 1 次提交
  17. 27 3月, 2010 2 次提交
  18. 09 3月, 2010 1 次提交
  19. 20 2月, 2010 2 次提交