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 <dimas...@yandex-team.ru> 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 <dimas...@yandex-team.ru> > > --- > > 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(-) > >