[PATCH v7 0/8] Packed virtqueue for virtio

Eugenio Pérez posted 8 patches 4 years, 6 months ago
Test asan passed
Test checkpatch passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191025083527.30803-1-eperezma@redhat.com
Maintainers: Fam Zheng <fam@euphon.net>, Jason Wang <jasowang@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Max Reitz <mreitz@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Amit Shah <amit@kernel.org>, Laurent Vivier <lvivier@redhat.com>, Kevin Wolf <kwolf@redhat.com>
hw/block/virtio-blk.c       |    7 +-
hw/char/virtio-serial-bus.c |    2 +-
hw/net/vhost_net.c          |    2 +
hw/scsi/virtio-scsi.c       |    3 +-
hw/virtio/virtio-rng.c      |    1 +
hw/virtio/virtio.c          | 1154 ++++++++++++++++++++++++++++++++++++++-----
include/hw/virtio/virtio.h  |   14 +-
7 files changed, 1045 insertions(+), 138 deletions(-)
[PATCH v7 0/8] Packed virtqueue for virtio
Posted by Eugenio Pérez 4 years, 6 months ago
Hi:

This is an updated version of packed virtqueue support based on Wei and Jason's
V6, mainly solving the clang leak detector error CI gave.

Please review.

Changes from V6:
- Commit reorder: Squash bugfix and sepparate big changes into smaller commits.

Changes from V5:
- Fix qemu's CI asan error.
- Move/copy rcu comments.
- Merge duplicated vdev->broken check between split and packet version.

Eugenio Pérez (2):
  virtio: Free blk virqueues at unrealize()
  virtio: Free rnd virqueue at unrealize()

Jason Wang (4):
  virtio: basic packed virtqueue support
  virtio: event suppression support for packed ring
  vhost_net: enable packed ring support
  virtio: add property to enable packed virtqueue

Wei Xu (2):
  virtio: basic structure for packed ring
  virtio: device/driver area size calculation refactor for split ring

 hw/block/virtio-blk.c       |    7 +-
 hw/char/virtio-serial-bus.c |    2 +-
 hw/net/vhost_net.c          |    2 +
 hw/scsi/virtio-scsi.c       |    3 +-
 hw/virtio/virtio-rng.c      |    1 +
 hw/virtio/virtio.c          | 1154 ++++++++++++++++++++++++++++++++++++++-----
 include/hw/virtio/virtio.h  |   14 +-
 7 files changed, 1045 insertions(+), 138 deletions(-)

-- 
2.16.5


Re: [PATCH v7 0/8] Packed virtqueue for virtio
Posted by Michael S. Tsirkin 4 years, 6 months ago
On Fri, Oct 25, 2019 at 10:35:19AM +0200, Eugenio Pérez wrote:
> Hi:
> 
> This is an updated version of packed virtqueue support based on Wei and Jason's
> V6, mainly solving the clang leak detector error CI gave.


Looks good, I will queue this up.

It would be nice to add libqos based tests on top,
based on Stefan's work.


> Please review.
> 
> Changes from V6:
> - Commit reorder: Squash bugfix and sepparate big changes into smaller commits.
> 
> Changes from V5:
> - Fix qemu's CI asan error.
> - Move/copy rcu comments.
> - Merge duplicated vdev->broken check between split and packet version.
> 
> Eugenio Pérez (2):
>   virtio: Free blk virqueues at unrealize()
>   virtio: Free rnd virqueue at unrealize()
> 
> Jason Wang (4):
>   virtio: basic packed virtqueue support
>   virtio: event suppression support for packed ring
>   vhost_net: enable packed ring support
>   virtio: add property to enable packed virtqueue
> 
> Wei Xu (2):
>   virtio: basic structure for packed ring
>   virtio: device/driver area size calculation refactor for split ring
> 
>  hw/block/virtio-blk.c       |    7 +-
>  hw/char/virtio-serial-bus.c |    2 +-
>  hw/net/vhost_net.c          |    2 +
>  hw/scsi/virtio-scsi.c       |    3 +-
>  hw/virtio/virtio-rng.c      |    1 +
>  hw/virtio/virtio.c          | 1154 ++++++++++++++++++++++++++++++++++++++-----
>  include/hw/virtio/virtio.h  |   14 +-
>  7 files changed, 1045 insertions(+), 138 deletions(-)
> 
> -- 
> 2.16.5

Re: [PATCH v7 0/8] Packed virtqueue for virtio
Posted by Stefan Hajnoczi 4 years, 6 months ago
On Fri, Oct 25, 2019 at 07:34:03AM -0400, Michael S. Tsirkin wrote:
> On Fri, Oct 25, 2019 at 10:35:19AM +0200, Eugenio Pérez wrote:
> > Hi:
> > 
> > This is an updated version of packed virtqueue support based on Wei and Jason's
> > V6, mainly solving the clang leak detector error CI gave.
> 
> 
> Looks good, I will queue this up.
> 
> It would be nice to add libqos based tests on top,
> based on Stefan's work.

Packed virtqueue support in libqos would be nice now that we have VIRTIO
1.0 support.  I think it could be added nicely now.

Writing a low-level virtqueue layout test is also possible if you want
to test QEMU's packed virtqueue code.  For example, a test case could
trigger error code paths by creating invalid rings/descriptors.

Stefan
Re: [PATCH v7 0/8] Packed virtqueue for virtio
Posted by Eugenio Perez Martin 4 years, 6 months ago
Hi Michael.

Totally agree with you. I investigated that for a short time but in
the end I tested manually with the coverage instrumentation, trying to
exercise the same "code" as current tests touches in split virtqueues.

I will automate at least these paths.

Thanks!


On Fri, Oct 25, 2019 at 1:35 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Fri, Oct 25, 2019 at 10:35:19AM +0200, Eugenio Pérez wrote:
> > Hi:
> >
> > This is an updated version of packed virtqueue support based on Wei and Jason's
> > V6, mainly solving the clang leak detector error CI gave.
>
>
> Looks good, I will queue this up.
>
> It would be nice to add libqos based tests on top,
> based on Stefan's work.
>
>
> > Please review.
> >
> > Changes from V6:
> > - Commit reorder: Squash bugfix and sepparate big changes into smaller commits.
> >
> > Changes from V5:
> > - Fix qemu's CI asan error.
> > - Move/copy rcu comments.
> > - Merge duplicated vdev->broken check between split and packet version.
> >
> > Eugenio Pérez (2):
> >   virtio: Free blk virqueues at unrealize()
> >   virtio: Free rnd virqueue at unrealize()
> >
> > Jason Wang (4):
> >   virtio: basic packed virtqueue support
> >   virtio: event suppression support for packed ring
> >   vhost_net: enable packed ring support
> >   virtio: add property to enable packed virtqueue
> >
> > Wei Xu (2):
> >   virtio: basic structure for packed ring
> >   virtio: device/driver area size calculation refactor for split ring
> >
> >  hw/block/virtio-blk.c       |    7 +-
> >  hw/char/virtio-serial-bus.c |    2 +-
> >  hw/net/vhost_net.c          |    2 +
> >  hw/scsi/virtio-scsi.c       |    3 +-
> >  hw/virtio/virtio-rng.c      |    1 +
> >  hw/virtio/virtio.c          | 1154 ++++++++++++++++++++++++++++++++++++++-----
> >  include/hw/virtio/virtio.h  |   14 +-
> >  7 files changed, 1045 insertions(+), 138 deletions(-)
> >
> > --
> > 2.16.5