Re: [RFC PATCH 02/27] vhost: Add device callback in vhost_migration_log

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

 



On Mon, Dec 7, 2020 at 5:19 PM Stefan Hajnoczi <stefanha@xxxxxxxxx> wrote:
>
> On Fri, Nov 20, 2020 at 07:50:40PM +0100, Eugenio Pérez wrote:
> > This allows code to reuse the logic to not to re-enable or re-disable
> > migration mechanisms. Code works the same way as before.
> >
> > Signed-off-by: Eugenio Pérez <eperezma@xxxxxxxxxx>
> > ---
> >  hw/virtio/vhost.c | 12 +++++++-----
> >  1 file changed, 7 insertions(+), 5 deletions(-)
> >
> > diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
> > index 2bd8cdf893..2adb2718c1 100644
> > --- a/hw/virtio/vhost.c
> > +++ b/hw/virtio/vhost.c
> > @@ -862,7 +862,9 @@ err_features:
> >      return r;
> >  }
> >
> > -static int vhost_migration_log(MemoryListener *listener, bool enable)
> > +static int vhost_migration_log(MemoryListener *listener,
> > +                               bool enable,
> > +                               int (*device_cb)(struct vhost_dev *, bool))
>
> Please document the argument. What is the callback function supposed to
> do ("device_cb" is not descriptive so I'm not sure)?

Sure, I will expand documentation if we stick with this approach to
enable/disable the shadow virtqueue (I hope we agree on a better one
anyway).

Just for completion, it was meant for vhost_dev_set_log, so vhost_dev*
is the device to enable/disable migration, and the second bool is for
enable/disable it.

Thanks!





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux