qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/5] vhost: introduce wrappers to set guest notifiers for


From: Raphael Norwitz
Subject: Re: [PATCH v2 2/5] vhost: introduce wrappers to set guest notifiers for virtio device
Date: Sun, 3 May 2020 20:36:45 -0400

I’m happy from the vhost, vhost-user-blk and vhost-user-scsi side. For
other device types it looks pretty straightforward, but their maintainers
should probably confirm.

Since you plan to change the behavior of these helpers in subsequent
patches, maybe consider sending the other device types separately
after the rest of the series has been merged? That way the changes to
individual devices will be much easier to review.

On Thu, Apr 30, 2020 at 9:48 AM Dima Stepanov <address@hidden> wrote:
>
> Introduce new wrappers to set/reset guest notifiers for the virtio
> device in the vhost device module:
>   vhost_dev_assign_guest_notifiers
>     ->set_guest_notifiers(..., ..., true);
>   vhost_dev_drop_guest_notifiers
>     ->set_guest_notifiers(..., ..., false);
> This is a preliminary step to refactor code, so the set_guest_notifiers
> methods could be called based on the vhost device state.
> Update all vhost used devices to use these wrappers instead of direct
> method call.
>
> Signed-off-by: Dima Stepanov <address@hidden>
> ---
>  backends/cryptodev-vhost.c  | 26 +++++++++++++++-----------
>  backends/vhost-user.c       | 16 +++++-----------
>  hw/block/vhost-user-blk.c   | 15 +++++----------
>  hw/net/vhost_net.c          | 30 +++++++++++++++++-------------
>  hw/scsi/vhost-scsi-common.c | 15 +++++----------
>  hw/virtio/vhost-user-fs.c   | 17 +++++++----------
>  hw/virtio/vhost-vsock.c     | 18 ++++++++----------
>  hw/virtio/vhost.c           | 38 ++++++++++++++++++++++++++++++++++++++
>  hw/virtio/virtio.c          | 13 +++++++++++++
>  include/hw/virtio/vhost.h   |  4 ++++
>  include/hw/virtio/virtio.h  |  1 +
>  11 files changed, 118 insertions(+), 75 deletions(-)
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]