Eugenio Pérez <epere...@redhat.com> writes: > Initial version of shadow virtqueue that actually forward buffers. There > are no iommu support at the moment, and that will be addressed in future > patches of this series. Since all vhost-vdpa devices uses forced IOMMU, > this means that SVQ is not usable at this point of the series on any > device. > > For simplicity it only supports modern devices, that expects vring > in little endian, with split ring and no event idx or indirect > descriptors. Support for them will not be added in this series. > > It reuses the VirtQueue code for the device part. The driver part is > based on Linux's virtio_ring driver, but with stripped functionality > and optimizations so it's easier to review. Later commits add simpler > ones. > > SVQ uses VIRTIO_CONFIG_S_DEVICE_STOPPED to pause the device and > retrieve its status (next available idx the device was going to > consume) race-free. It can later reset the device to replace vring > addresses etc. When SVQ starts qemu can resume consuming the guest's > driver ring from that state, without notice from the latter. > > This status bit VIRTIO_CONFIG_S_DEVICE_STOPPED is currently discussed > in VirtIO, and is implemented in qemu VirtIO-net devices in previous > commits. > > Removal of _S_DEVICE_STOPPED bit (in other words, resuming the device) > can be done in the future if an use case arises. At this moment we can > just rely on reseting the full device. > > Signed-off-by: Eugenio Pérez <epere...@redhat.com> > --- > qapi/net.json | 2 +- > hw/virtio/vhost-shadow-virtqueue.c | 237 ++++++++++++++++++++++++++++- > hw/virtio/vhost-vdpa.c | 109 ++++++++++++- > 3 files changed, 337 insertions(+), 11 deletions(-) > > diff --git a/qapi/net.json b/qapi/net.json > index fe546b0e7c..1f4a55f2c5 100644 > --- a/qapi/net.json > +++ b/qapi/net.json > @@ -86,7 +86,7 @@ > # > # @name: the device name of the VirtIO device > # > -# @enable: true to use the alternate shadow VQ notifications > +# @enable: true to use the alternate shadow VQ buffers fowarding path
Uh, why does the flag change meaning half-way through this series? > # > # Returns: Error if failure, or 'no error' for success. > # [...]