1. 20 5月, 2011 13 次提交
  2. 19 5月, 2011 7 次提交
    • A
      ahci: Fix non-NCQ accesses for LBA > 16bits · 1fddfba1
      Alexander Graf 提交于
      AHCI provides two ways of reading/writing data:
      
       1) NCQ
       2) ATA commands with the LBA in the command FIS
      
      In the second code path, we didn't handle any LBAs that were bigger than
      16 bits, so whenever a guest that used high LBA numbers wanted to access
      data, the LBA got truncated down to 16 bits, giving the guest garbage.
      
      This patch adds support for LBAs higher than 16 bits. I've tested that it
      works just fine with SeaBIOS and Linux guests. This patch also unbreaks
      the often reported grub errors people have seen with AHCI.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      1fddfba1
    • M
      block: Remove type hint, it's guest matter, doesn't belong here · 8d278467
      Markus Armbruster 提交于
      No users of bdrv_get_type_hint() left.  bdrv_set_type_hint() can make
      the media removable by side effect.  Make that explicit.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      8d278467
    • M
      blockdev: Store -drive option media in DriveInfo · 95b5edcd
      Markus Armbruster 提交于
      DriveInfo is closely tied to -drive, and like -drive, it mixes
      information about host and guest part of the block device.  Unlike
      DriveInfo, BlockDriverState should be about the host part only.
      
      One of the remaining guest bits there is the "type hint".  -drive
      option media sets it, and qdevs "ide-drive", "scsi-disk" and non-qdev
      IF_XEN devices check it to pick HD vs. CD.
      
      Communicate -drive option media via new DriveInfo member media_cd
      instead.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      95b5edcd
    • M
      block QMP: Deprecate query-block's "type", drop info block's "type=" · d8aeeb31
      Markus Armbruster 提交于
      query-block's specification documents response member "type" with
      values "hd", "cdrom", "floppy", "unknown".
      
      Its value is unreliable: a block device used as floppy has type
      "floppy" if created with if=floppy, but type "hd" if created with
      if=none.
      
      That's because with if=none, the type is at best a declaration of
      intent: the drive can be connected to any guest device.  Its type is
      really the guest device's business.  Reporting it here is wrong.
      
      No known user of QMP uses "type".  It's unlikely that any unknown
      users exist, because its value is useless unless you know how the
      block device was created.  But then you also know the true value.
      
      Fixing the broken value risks breaking (hypothetical!) clients that
      somehow rely on the current behavior.  Not fixing the value risks
      breaking (hypothetical!) clients that rely on the value to be
      accurate.  Can't entirely avoid hypothetical lossage.  Change the
      value to be always "unknown".
      
      This makes "info block" always report "type=unknown".  Pointless.
      Change it to not report the type.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      d8aeeb31
    • M
      defaults: ide-cd, ide-hd and scsi-cd devices suppress default CD-ROM · af6bf132
      Markus Armbruster 提交于
      ide-hd has to suppress the default CD-ROM, or else you can't put one
      on secondary master without -nodefaults.
      
      Unlike legacy scsi-disk, scsi-cd suppresses default CD-ROM.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      af6bf132
    • M
      scsi: Split qdev "scsi-disk" into "scsi-hd" and "scsi-cd" · b443ae67
      Markus Armbruster 提交于
      A "scsi-disk" 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 "scsi-hd" and "scsi-cd" to model disk vs. CD in
      the guest part.
      
      Keep scsi-disk for backward compatibility.
      
      Don't copy scsi-disk property removable to scsi-cd.  It's not used and
      always zero(!) there.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      b443ae67
    • 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. 18 5月, 2011 11 次提交
  4. 16 5月, 2011 1 次提交
  5. 15 5月, 2011 8 次提交