1. 27 2月, 2012 1 次提交
  2. 22 2月, 2012 1 次提交
  3. 09 2月, 2012 2 次提交
    • S
      qed: replace is_write with flags field · 6e4f59bd
      Stefan Hajnoczi 提交于
      Per-request attributes like read/write are currently implemented as bool
      fields in the QEDAIOCB struct.  This becomes unwiedly as the number of
      attributes grows.  For example, the qed_aio_setup() function would have
      to take multiple bool arguments and at call sites it would be hard to
      distinguish the meaning of each bool.
      
      Instead use a flags field with bitmask constants.  This will be used
      when zero write support is added.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      6e4f59bd
    • S
      block: add .bdrv_co_write_zeroes() interface · f08f2dda
      Stefan Hajnoczi 提交于
      The ability to zero regions of an image file is a useful primitive for
      higher-level features such as image streaming or zero write detection.
      
      Image formats may support an optimized metadata representation instead
      of writing zeroes into the image file.  This allows zero writes to be
      potentially faster than regular write operations and also preserve
      sparseness of the image file.
      
      The .bdrv_co_write_zeroes() interface should be implemented by block
      drivers that wish to provide efficient zeroing.
      
      Note that this operation is different from the discard operation, which
      may leave the contents of the region indeterminate.  That means
      discarded blocks are not guaranteed to contain zeroes and may contain
      junk data instead.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f08f2dda
  4. 31 1月, 2012 1 次提交
  5. 26 1月, 2012 5 次提交
  6. 19 1月, 2012 1 次提交
  7. 13 1月, 2012 1 次提交
  8. 04 1月, 2012 1 次提交
  9. 21 12月, 2011 1 次提交
  10. 15 12月, 2011 1 次提交
    • P
      block: bdrv_aio_* do not return NULL · ad54ae80
      Paolo Bonzini 提交于
      Initially done with the following semantic patch:
      
      @ rule1 @
      expression E;
      statement S;
      @@
        E =
      (
         bdrv_aio_readv
      |  bdrv_aio_writev
      |  bdrv_aio_flush
      |  bdrv_aio_discard
      |  bdrv_aio_ioctl
      )
           (...);
      (
      - if (E == NULL) { ... }
      |
      - if (E)
          { <... S ...> }
      )
      
      which however missed the occurrence in block/blkverify.c
      (as it should have done), and left behind some unused
      variables.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      ad54ae80
  11. 05 12月, 2011 2 次提交
  12. 30 10月, 2011 1 次提交
  13. 29 10月, 2011 2 次提交
    • P
      scsi: do not call transfer_data after canceling a request · e88c591d
      Paolo Bonzini 提交于
      Otherwise, if cancellation is "faked" by the AIO layer and goes
      through qemu_aio_flush, the whole request is completed synchronously
      during scsi_req_cancel.
      
      Using the enqueued flag would work here, but not in the next patches,
      so I'm introducing a new io_canceled flag.  That's because scsi_req_data
      is a synchronous callback and the enqueued flag might be reset by the
      time it returns.  scsi-disk cannot unref the request until after calling
      scsi_req_data.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      e88c591d
    • R
      iSCSI block driver · c589b249
      Ronnie Sahlberg 提交于
      This provides built-in support for iSCSI to QEMU.
      
      This has the advantage that the iSCSI devices need not be made visible to the host, which is useful if you have very many virtual machines and very many iscsi devices.
      It also has the benefit that non-root users of QEMU can access iSCSI devices across the network without requiring root privilege on the host.
      
      This driver interfaces with the multiplatform posix library for iscsi initiator/client access to iscsi devices hosted at
          git://github.com/sahlberg/libiscsi.git
      
      The patch adds the driver to interface with the iscsi library.
      It also updated the configure script to
      * by default, probe is libiscsi is available and if so, build
        qemu against libiscsi.
      * --enable-libiscsi
        Force a build against libiscsi. If libiscsi is not available
        the build will fail.
      * --disable-libiscsi
        Do not link against libiscsi, even if it is available.
      
      When linked with libiscsi, qemu gains support to access iscsi resources such as disks and cdrom directly, without having to make the devices visible to the host.
      
      You can specify devices using a iscsi url of the form :
      iscsi://[<username>[:<password>@]]<host>[:<port]/<target-iqn-name>/<lun>
      When using authentication, the password can optionally be set with
      LIBISCSI_CHAP_PASSWORD="password" to avoid it showing up in the process list
      Signed-off-by: NRonnie Sahlberg <ronniesahlberg@gmail.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      c589b249
  14. 27 10月, 2011 3 次提交
  15. 21 10月, 2011 2 次提交
    • P
      block: add bdrv_co_discard and bdrv_aio_discard support · 4265d620
      Paolo Bonzini 提交于
      This similarly adds support for coroutine and asynchronous discard.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4265d620
    • S
      hw/9pfs: Fix broken compilation caused by wrong trace events · c76eaf13
      Stefan Weil 提交于
      Commit c572f23a added trace events
      with mismatching format string and arguments.
      
      gcc reports these errors:
      
      In file included from trace.c:2:0:
      trace.h: In function ‘trace_v9fs_attach’:
      trace.h:2850:9: error: too many arguments for format [-Werror=format-extra-args]
      trace.h: In function ‘trace_v9fs_wstat’:
      trace.h:3039:9: error: too many arguments for format [-Werror=format-extra-args]
      trace.h: In function ‘trace_v9fs_mkdir’:
      trace.h:3088:9: error: too many arguments for format [-Werror=format-extra-args]
      trace.h: In function ‘trace_v9fs_mkdir_return’:
      trace.h:3095:9: error: too many arguments for format [-Werror=format-extra-args]
      
      Fix the format strings and also use %u instead of %d for unsigned values
      in the changed strings. There are more minor errors of this kind
      which I did not fix because that would make the review more difficult.
      
      v2: Fixed position of } for v9fs_mkdir_return.
      
      Cc: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      c76eaf13
  16. 16 10月, 2011 1 次提交
  17. 15 10月, 2011 1 次提交
  18. 03 10月, 2011 4 次提交
  19. 01 10月, 2011 1 次提交
  20. 21 9月, 2011 1 次提交
  21. 17 9月, 2011 3 次提交
  22. 12 9月, 2011 1 次提交
  23. 11 9月, 2011 1 次提交
  24. 07 9月, 2011 2 次提交
    • G
      usb: claim port at device initialization time. · 891fb2cd
      Gerd Hoffmann 提交于
      This patch makes qemu assign a port when creating the device, not when
      attaching it.  For most usb devices this isn't a noticable difference
      because they are in attached state all the time.
      
      The change affects usb-host devices which live in detached state while
      the real device is unplugged from the host.  They have a fixed port
      assigned all the time now instead of getting grabbing one on attach and
      releasing it at detach, i.e. they stop floating around at the usb bus.
      
      The change also allows to simplify usb-hub.  It doesn't need the
      handle_attach() callback any more to configure the downstream ports.
      This can be done at device initialitation time now.  The changed
      initialization order (first grab upstream port, then register downstream
      ports) also fixes some icky corner cases.  For example it is not possible
      any more to plug the hub into one of its own downstream ports.
      
      The usb host adapters must care too.  USBPort->dev being non-NULL
      doesn't imply any more the device is in attached state.  The host
      adapters must additionally check the USBPort->dev->attached flag.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      891fb2cd
    • G
      usb-ehci: handle siTDs · 2fe80192
      Gerd Hoffmann 提交于
      This patch adds code to do minimal siTD handling, which is basically
      just following the next pointer.  This is good enougth to handle the
      inactive siTDs used by FreeBSD.  Active siTDs are skipped too as we
      don't have split transfer support in qemu, additionally a warning is
      printed.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      2fe80192