1. 12 6月, 2020 1 次提交
    • S
      libvhost-user: advertise vring features · a9a5c473
      Stefan Hajnoczi 提交于
      libvhost-user implements several vring features without advertising
      them. There is no way for the vhost-user master to detect support for
      these features.
      
      Things more or less work today because QEMU assumes the vhost-user
      backend always implements certain feature bits like
      VIRTIO_RING_F_EVENT_IDX. This is not documented anywhere.
      
      This patch explicitly advertises features implemented in libvhost-user
      so that the vhost-user master does not need to make undocumented
      assumptions.
      
      Feature bits that libvhost-user now advertises can be removed from
      vhost-user-blk.c. Devices should not be responsible for advertising
      vring feature bits, that is libvhost-user's job.
      
      Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-Id: <20200529161338.456017-1-stefanha@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      a9a5c473
  2. 05 1月, 2020 1 次提交
  3. 05 7月, 2019 1 次提交
    • S
      libvhost-user: support many virtqueues · 6f5fd837
      Stefan Hajnoczi 提交于
      Currently libvhost-user is hardcoded to at most 8 virtqueues.  The
      device backend should decide the number of virtqueues, not
      libvhost-user.  This is important for multiqueue device backends where
      the guest driver needs an accurate number of virtqueues.
      
      This change breaks libvhost-user and libvhost-user-glib API stability.
      There is no stability guarantee yet, so make this change now and update
      all in-tree library users.
      
      This patch touches up vhost-user-blk, vhost-user-gpu, vhost-user-input,
      vhost-user-scsi, and vhost-user-bridge.  If the device has a fixed
      number of queues that exact number is used.  Otherwise the previous
      default of 8 virtqueues is used.
      
      vu_init() and vug_init() can now fail if malloc() returns NULL.  I
      considered aborting with an error in libvhost-user but it should be safe
      to instantiate new vhost-user instances at runtime without risk of
      terminating the process.  Therefore callers need to handle the vu_init()
      failure now.
      
      vhost-user-blk and vhost-user-scsi duplicate virtqueue index checks that
      are already performed by libvhost-user.  This code would need to be
      modified to use max_queues but remove it completely instead since it's
      redundant.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20190626074815.19994-3-stefanha@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      6f5fd837
  4. 21 5月, 2019 1 次提交
  5. 22 2月, 2019 2 次提交
  6. 05 2月, 2019 2 次提交
  7. 20 12月, 2018 1 次提交
  8. 02 6月, 2018 1 次提交
  9. 23 5月, 2018 1 次提交
  10. 19 1月, 2018 1 次提交