qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH QEMU v25 12/17] vfio: Add function to start and stop dirty pa


From: Cornelia Huck
Subject: Re: [PATCH QEMU v25 12/17] vfio: Add function to start and stop dirty pages tracking
Date: Tue, 23 Jun 2020 13:06:12 +0200

On Tue, 23 Jun 2020 12:01:25 +0100
"Dr. David Alan Gilbert" <dgilbert@redhat.com> wrote:

> * Cornelia Huck (cohuck@redhat.com) wrote:
> > On Sun, 21 Jun 2020 01:51:21 +0530
> > Kirti Wankhede <kwankhede@nvidia.com> wrote:
> >   
> > > Call VFIO_IOMMU_DIRTY_PAGES ioctl to start and stop dirty pages tracking
> > > for VFIO devices.
> > > 
> > > Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
> > > Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > > ---
> > >  hw/vfio/migration.c | 36 ++++++++++++++++++++++++++++++++++++
> > >  1 file changed, 36 insertions(+)
> > > 
> > > diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c
> > > index faacea5327cb..e0fbb3a01855 100644
> > > --- a/hw/vfio/migration.c
> > > +++ b/hw/vfio/migration.c
> > > @@ -11,6 +11,7 @@
> > >  #include "qemu/main-loop.h"
> > >  #include "qemu/cutils.h"
> > >  #include <linux/vfio.h>
> > > +#include <sys/ioctl.h>
> > >  
> > >  #include "sysemu/runstate.h"
> > >  #include "hw/vfio/vfio-common.h"
> > > @@ -329,6 +330,32 @@ static int vfio_load_device_config_state(QEMUFile 
> > > *f, void *opaque)
> > >      return qemu_file_get_error(f);
> > >  }
> > >  
> > > +static int vfio_start_dirty_page_tracking(VFIODevice *vbasedev, bool 
> > > start)  
> > 
> > I find 'start' functions that may also stop something a bit confusing.
> > Maybe vfio_toggle_dirty_page_tracking()?  
> 
> I don't think toggle is any better; I always think of toggle as flipping
> the state to the other state.
> vfio_set_dirty_page_tracking maybe?

Sounds good to me.




reply via email to

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