1. 15 6月, 2011 3 次提交
    • C
      ide: add TRIM support · d353fb72
      Christoph Hellwig 提交于
      Add support for TRIM sub function of the data set management command,
      and wire it up to the qemu discard infrastructure.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      d353fb72
    • C
      ide: allow other dma comands than read and write · 4e1e0051
      Christoph Hellwig 提交于
      Replace the is_read flag with a dma_cmd flag to allow the dma and
      restart logic to handler other commands like TRIM.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4e1e0051
    • K
      ide: Split error status from status register · def93791
      Kevin Wolf 提交于
      When adding the werror=stop mode, some flags were added to s->status
      which are used to determine what kind of operation should be restarted
      when the VM is continued.
      
      Unfortunately, it turns out that s->status is in fact a device register
      and as such is visible to the guest (some of the abused bits are even
      writable for the guest).
      
      For migration we keep on using the old VMState field (renamed to
      migration_compat_status) if the status register doesn't use any of the
      previously abused bits. If it does, we use a subsection with a clean copy of
      the status register.
      
      The error status is always sent in a subsection if there is any error. It can't
      use the old field because errors happen even without PCI.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      def93791
  2. 19 5月, 2011 1 次提交
    • M
      ide: Split qdev "ide-drive" into "ide-hd" and "ide-cd" · 1f56e32a
      Markus Armbruster 提交于
      An "ide-drive" is either a hard disk or a CD-ROM, depending on the
      associated BlockDriverState's type hint.  Unclean; disk vs. CD belongs
      to the guest part, not the host part.
      
      Have separate qdevs "ide-hd" and "ide-cd" to model disk vs. CD in
      the guest part.
      
      Keep ide-drive for backward compatibility.
      
      "ide-disk" would perhaps be a nicer name than "ide-hd", but there's
      already "scsi-disk", which is like "ide-drive", and will be likewise
      split in the next commit.  {ide,scsi}-{hd,cd} is the best consistent
      set of names I could find within the backward compatibility
      straightjacket.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      1f56e32a
  3. 27 4月, 2011 1 次提交
  4. 13 4月, 2011 1 次提交
    • A
      atapi: GESN: implement 'media' subcommand · 996faf1a
      Amit Shah 提交于
      Implement the 'media' sub-command of the GET_EVENT_STATUS_NOTIFICATION
      command.  This helps us report tray open, tray closed, no media, media
      present states to the guest.
      
      Newer Linux kernels (2.6.38+) rely on this command to revalidate discs
      after media change.
      
      This patch also sends out tray open/closed status to the guest driver
      when requested e.g. via the CDROM_DRIVE_STATUS ioctl (thanks Markus).
      Without such notification, the guest and qemu's tray open/close status
      was frequently out of sync, causing installers like Anaconda detecting
      no disc instead of tray open, confusing them terribly.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Acked-by: NJes Sorensen <Jes.Sorensen@redhat.com>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      996faf1a
  5. 24 1月, 2011 1 次提交
  6. 17 12月, 2010 3 次提交
  7. 12 12月, 2010 1 次提交
  8. 25 11月, 2010 1 次提交
  9. 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
  10. 27 7月, 2010 2 次提交
  11. 06 7月, 2010 2 次提交
  12. 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
  13. 04 6月, 2010 4 次提交
  14. 02 5月, 2010 1 次提交
  15. 20 2月, 2010 1 次提交
  16. 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
  17. 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
  18. 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
  19. 04 12月, 2009 1 次提交
  20. 07 11月, 2009 1 次提交
  21. 28 10月, 2009 4 次提交
  22. 12 10月, 2009 2 次提交
  23. 05 10月, 2009 1 次提交
  24. 16 9月, 2009 2 次提交
  25. 04 9月, 2009 2 次提交