1. 05 12月, 2011 1 次提交
  2. 30 10月, 2011 1 次提交
  3. 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
  4. 27 10月, 2011 3 次提交
  5. 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
  6. 16 10月, 2011 1 次提交
  7. 15 10月, 2011 1 次提交
  8. 03 10月, 2011 4 次提交
  9. 01 10月, 2011 1 次提交
  10. 21 9月, 2011 1 次提交
  11. 17 9月, 2011 3 次提交
  12. 12 9月, 2011 1 次提交
  13. 11 9月, 2011 1 次提交
  14. 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
  15. 02 9月, 2011 1 次提交
  16. 01 9月, 2011 2 次提交
  17. 28 8月, 2011 1 次提交
  18. 23 8月, 2011 1 次提交
  19. 22 8月, 2011 1 次提交
  20. 12 8月, 2011 2 次提交
  21. 02 8月, 2011 3 次提交
  22. 01 8月, 2011 1 次提交
    • K
      coroutine: introduce coroutines · 00dccaf1
      Kevin Wolf 提交于
      Asynchronous code is becoming very complex.  At the same time
      synchronous code is growing because it is convenient to write.
      Sometimes duplicate code paths are even added, one synchronous and the
      other asynchronous.  This patch introduces coroutines which allow code
      that looks synchronous but is asynchronous under the covers.
      
      A coroutine has its own stack and is therefore able to preserve state
      across blocking operations, which traditionally require callback
      functions and manual marshalling of parameters.
      
      Creating and starting a coroutine is easy:
      
        coroutine = qemu_coroutine_create(my_coroutine);
        qemu_coroutine_enter(coroutine, my_data);
      
      The coroutine then executes until it returns or yields:
      
        void coroutine_fn my_coroutine(void *opaque) {
            MyData *my_data = opaque;
      
            /* do some work */
      
            qemu_coroutine_yield();
      
            /* do some more work */
        }
      
      Yielding switches control back to the caller of qemu_coroutine_enter().
      This is typically used to switch back to the main thread's event loop
      after issuing an asynchronous I/O request.  The request callback will
      then invoke qemu_coroutine_enter() once more to switch back to the
      coroutine.
      
      Note that if coroutines are used only from threads which hold the global
      mutex they will never execute concurrently.  This makes programming with
      coroutines easier than with threads.  Race conditions cannot occur since
      only one coroutine may be active at any time.  Other coroutines can only
      run across yield.
      
      This coroutines implementation is based on the gtk-vnc implementation
      written by Anthony Liguori <anthony@codemonkey.ws> but it has been
      significantly rewritten by Kevin Wolf <kwolf@redhat.com> to use
      setjmp()/longjmp() instead of the more expensive swapcontext() and by
      Paolo Bonzini <pbonzini@redhat.com> for Windows Fibers support.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      00dccaf1
  23. 22 7月, 2011 1 次提交
  24. 21 7月, 2011 1 次提交