1. 09 4月, 2018 1 次提交
  2. 20 3月, 2018 5 次提交
  3. 14 2月, 2018 1 次提交
  4. 19 1月, 2018 1 次提交
  5. 12 10月, 2017 3 次提交
  6. 11 10月, 2017 1 次提交
  7. 08 9月, 2017 1 次提交
  8. 15 6月, 2017 1 次提交
    • F
      vhost-user-scsi: Introduce a vhost-user-scsi sample application · 49cc0340
      Felipe Franciosi 提交于
      This commit introduces a vhost-user-scsi backend sample application. It
      must be linked with libiscsi and libvhost-user.
      
      To use it, compile with:
        $ make vhost-user-scsi
      
      And run as follows:
        $ ./vhost-user-scsi -u vus.sock -i iscsi://uri_to_target/
        $ qemu-system-x86_64 --enable-kvm -m 512 \
            -object memory-backend-file,id=mem,size=512m,share=on,mem-path=guestmem \
            -numa node,memdev=mem \
            -chardev socket,id=vhost-user-scsi,path=vus.sock \
            -device vhost-user-scsi-pci,chardev=vhost-user-scsi \
      
      The application is currently limited at one LUN only and it processes
      requests synchronously (therefore only achieving QD1). The purpose of
      the code is to show how a backend can be implemented and to test the
      vhost-user-scsi Qemu implementation.
      
      If a different instance of this vhost-user-scsi application is executed
      at a remote host, a VM can be live migrated to such a host.
      Signed-off-by: NFelipe Franciosi <felipe@nutanix.com>
      Message-Id: <1488479153-21203-5-git-send-email-felipe@nutanix.com>
      49cc0340
  9. 11 5月, 2017 1 次提交
    • M
      libvhost-user: fix crash when rings aren't ready · 640601c7
      Marc-André Lureau 提交于
      Calling libvhost-user functions like vu_queue_get_avail_bytes() when the
      queue doesn't yet have addresses will result in the crashes like the
      following:
      
      Program received signal SIGSEGV, Segmentation fault.
      0x000055c414112ce4 in vring_avail_idx (vq=0x55c41582fd68, vq=0x55c41582fd68)
          at /home/dgilbert/git/qemu/contrib/libvhost-user/libvhost-user.c:940
      940            vq->shadow_avail_idx = vq->vring.avail->idx;
      (gdb) p vq
      $1 = (VuVirtq *) 0x55c41582fd68
      (gdb) p vq->vring
      $2 = {num = 0, desc = 0x0, avail = 0x0, used = 0x0, log_guest_addr = 0, flags = 0}
      
          at /home/dgilbert/git/qemu/contrib/libvhost-user/libvhost-user.c:940
      No locals.
          at /home/dgilbert/git/qemu/contrib/libvhost-user/libvhost-user.c:960
              num_heads = <optimized out>
          out_bytes=out_bytes@entry=0x7fffd035d7c4, max_in_bytes=max_in_bytes@entry=0,
          max_out_bytes=max_out_bytes@entry=0) at /home/dgilbert/git/qemu/contrib/libvhost-user/libvhost-user.c:1034
      
      Add a pre-condition checks on vring.avail before accessing it.
      
      Fix documentation and return type of vu_queue_empty() while at it.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Tested-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      640601c7
  10. 16 12月, 2016 1 次提交
    • M
      contrib: add libvhost-user · 7b2e5c65
      Marc-André Lureau 提交于
      Add a library to help implementing vhost-user backend (or slave).
      
      Dealing with vhost-user as an application developer isn't so easy: you
      have all the trouble with any protocol: validation, unix ancillary data,
      shared memory, eventfd, logging, and on top of that you need to deal
      with virtio queues, if possible efficiently.
      
      qemu test has a nice vhost-user testing application vhost-user-bridge,
      which implements most of vhost-user, and virtio.c which implements
      virtqueues manipulation. Based on these two, I tried to make a simple
      library, reusable for tests or development of new vhost-user scenarios.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      [Felipe: set used_idx copy on SET_VRING_ADDR and update shadow avail idx
       on SET_VRING_BASE]
      Signed-off-by: NFelipe Franciosi <felipe@nutanix.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      7b2e5c65