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: Dima Stepanov
Subject: Re: [PATCH v2 2/5] vhost: introduce wrappers to set guest notifiers for virtio device
Date: Wed, 6 May 2020 11:54:43 +0300
User-agent: Mutt/1.5.24 (2015-08-30)

On Sun, May 03, 2020 at 08:36:45PM -0400, Raphael Norwitz wrote:
> 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.

Thanks for comments.
Agree, will make a more straightforward fix only for vhost-user-blk.
After it we can figure out how to propogate this change to other
devices.

> 
> 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]