1. 22 5月, 2012 7 次提交
    • P
      virtio-blk: always enable VIRTIO_BLK_F_SCSI · a6c5c84a
      Paolo Bonzini 提交于
      VIRTIO_BLK_F_SCSI is supposed to mean whether the host can *parse*
      SCSI requests, not *execute* them.  You could run QEMU with scsi=on
      and a file-backed disk, and QEMU would fail all SCSI requests even
      though it advertises VIRTIO_BLK_F_SCSI.
      
      Because we need to do this to fix a migration compatibility problem
      related to how QEMU is invoked by management, we must do this
      unconditionally even on older machine types.  This more or less assumes
      that no one ever invoked QEMU with scsi=off.
      
      Here is how testing goes:
      
      - old QEMU, scsi=on -> new QEMU, scsi=on
      - new QEMU, scsi=on -> old QEMU, scsi=on
      - old QEMU, scsi=off -> new QEMU, scsi=on
      - new QEMU, scsi=off -> old QEMU, scsi=on
              ok (new QEMU has VIRTIO_BLK_F_SCSI, adding host features is fine)
      
      - old QEMU, scsi=off -> new QEMU, scsi=off
              ok (new QEMU has VIRTIO_BLK_F_SCSI, adding host features is fine)
      
      - old QEMU, scsi=on -> new QEMU, scsi=off
              ok, bug fixed
      
      - new QEMU, scsi=on -> old QEMU, scsi=off
              doesn't work (same as: old QEMU, scsi=on -> old QEMU, scsi=off)
      
      - new QEMU, scsi=off -> old QEMU, scsi=off
              broken by the patch
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a6c5c84a
    • P
      virtio-blk: define VirtIOBlkConf · 12c5674b
      Paolo Bonzini 提交于
      We will have to add another field to the virtio-blk configuration in
      the next patch.  Avoid a proliferation of arguments to virtio_blk_init.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      12c5674b
    • P
      virtio-blk: blockdev_mark_auto_del is transport-independent · 0e47931b
      Paolo Bonzini 提交于
      Move it from virtio_blk_exit_pci to virtio_blk_exit.
      
      This is included here because the next patch removes proxy->block.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      0e47931b
    • P
      virtio-blk: report non-zero status when failing SG_IO requests · f34e73cd
      Paolo Bonzini 提交于
      Linux really looks only at scsi->errors for SG_IO requests; it does
      not look at the virtio request status at all.  Because of this, when
      a SG_IO request is failed early with virtio_blk_req_complete(req,
      VIRTIO_BLK_S_UNSUPP), without writing hdr.status, it will look like
      a success to the guest.
      
      This is their bug, but we can make it safe for older guests now by
      forcing scsi->errors to have a non-zero value whenever a request
      has to be failed.
      
      But if we fix the bug in the guest driver, we will have another problem
      because QEMU returns VIRTIO_BLK_S_IOERR if the status is non-zero, and
      Linux translates that to -EIO.  Rather, the guest should succeed the
      request and pass the non-zero status via the userspace-provided SG_IO
      structure.  So, remove the case where virtio_blk_handle_scsi can
      return VIRTIO_BLK_S_IOERR.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      f34e73cd
    • M
      use an uint64_t for the max_sz parameter in load_image_targphys · 80a2ba3d
      Mark Langsdorf 提交于
      Allow load_image_targphys to load files on systems with more than 2G of
      emulated memory by changing the max_sz parameter from an int to an
      uint64_t.
      Reviewed-by: NAndreas F=E4rber <afaerber@suse.de>
      Acked-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NMark Langsdorf <mark.langsdorf@calxeda.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      80a2ba3d
    • A
      Merge remote-tracking branch 'mdroth/qga-pull-5-15-12' into staging · b4f1a7ca
      Anthony Liguori 提交于
      * mdroth/qga-pull-5-15-12:
        qemu-ga: align versioning with QEMU_VERSION
        qemu-ga: fix segv after failure to open log file
        qemu-ga: guest-shutdown: use only async-signal-safe functions
        qemu-ga: guest-shutdown: become synchronous
        qemu-ga: guest-suspend: make the API synchronous
        qemu-ga: become_daemon(): reopen standard fds to /dev/null
        qemu-ga: make reopen_fd_to_null() public
        qemu-ga: guest-suspend-hybrid: don't emit a success response
        qemu-ga: guest-suspend-ram: don't emit a success response
        qemu-ga: guest-suspend-disk: don't emit a success response
        qemu-ga: guest-shutdown: don't emit a success response
        qemu-ga: don't warn on no command return
        qapi: add support for command options
      b4f1a7ca
    • S
      tests: Add rtc-test (fix test regression) · fba0c40b
      Stefan Weil 提交于
      Commit 93e9eb68 added fdc-test,
      but accidentally removed rtc-test because check-qtest-i386-y was
      not enhanced but set twice.
      
      This patch adds rtc-test again (and sorts both tests alphabetically).
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      fba0c40b
  2. 19 5月, 2012 5 次提交
  3. 18 5月, 2012 2 次提交
  4. 15 5月, 2012 17 次提交
  5. 14 5月, 2012 9 次提交