1. 26 1月, 2012 2 次提交
    • S
      block: add image streaming block job · 4f1043b4
      Stefan Hajnoczi 提交于
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4f1043b4
    • S
      block: make copy-on-read a per-request flag · 470c0504
      Stefan Hajnoczi 提交于
      Previously copy-on-read could only be enabled for all requests to a
      block device.  This means requests coming from the guest as well as
      QEMU's internal requests would perform copy-on-read when enabled.
      
      For image streaming we want to support finer-grained behavior than just
      populating the image file from its backing image.  Image streaming
      supports partial streaming where a common backing image is preserved.
      In this case guest requests should not perform copy-on-read because they
      would indiscriminately copy data which should be left in a backing image
      from the backing chain.
      
      Introduce a per-request flag for copy-on-read so that a block device can
      process both regular and copy-on-read requests.  Overlapping reads and
      writes still need to be serialized for correctness when copy-on-read is
      happening, so add an in-flight reference count to track this.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      470c0504
  2. 19 1月, 2012 1 次提交
  3. 13 1月, 2012 1 次提交
  4. 04 1月, 2012 1 次提交
  5. 21 12月, 2011 1 次提交
  6. 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
  7. 05 12月, 2011 2 次提交
  8. 30 10月, 2011 1 次提交
  9. 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
  10. 27 10月, 2011 3 次提交
  11. 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
  12. 16 10月, 2011 1 次提交
  13. 15 10月, 2011 1 次提交
  14. 03 10月, 2011 4 次提交
  15. 01 10月, 2011 1 次提交
  16. 21 9月, 2011 1 次提交
  17. 17 9月, 2011 3 次提交
  18. 12 9月, 2011 1 次提交
  19. 11 9月, 2011 1 次提交
  20. 07 9月, 2011 4 次提交
    • 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
    • G
      usb-host: claim port · 9516bb47
      Gerd Hoffmann 提交于
      When configured to pass through a specific host port (using hostbus and
      hostport properties), try to claim the port if supported by the kernel.
      That will avoid any kernel drivers binding to devices plugged into that
      port.  It will not stop any userspace apps (such as usb_modeswitch)
      access the device via usbfs though.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      9516bb47
    • G
      usb-host: start tracing support · e6a2f500
      Gerd Hoffmann 提交于
      Add a bunch of trace points to usb-linux.c  Drop a bunch of DPRINTK's in
      favor of the trace points.  Also cleanup error reporting a bit while being
      at it.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      e6a2f500
  21. 02 9月, 2011 1 次提交
  22. 01 9月, 2011 2 次提交
  23. 28 8月, 2011 1 次提交
  24. 23 8月, 2011 1 次提交
  25. 22 8月, 2011 1 次提交