Subject: Re: [PATCH V8 mlx5-next 10/15] vfio: Extend the device migration protocol with RUNNING_P2P

From: Jason Gunthorpe <[email-masked]>
Date: Wed, 23 Feb 2022 20:47:18 -0400

On Wed, Feb 23, 2022 at 10:42:48AM -0700, Alex Williamson wrote:
> On Sun, 20 Feb 2022 11:57:11 +0200
> Yishai Hadas <[email-masked]> wrote:
> > diff --git a/include/linux/vfio.h b/include/linux/vfio.h
> > index 3bbadcdbc9c8..3176cb5d4464 100644
> > +++ b/include/linux/vfio.h
> > @@ -33,6 +33,7 @@ struct vfio_device {
> >  	struct vfio_group *group;
> >  	struct vfio_device_set *dev_set;
> >  	struct list_head dev_set_list;
> > +	unsigned int migration_flags;
> 
> Maybe paranoia, but should we sanity test this in __vfio_register_dev()
> to reinforce to driver authors that not all bit combinations are valid?
> Thanks,

I don't like sanity testing things that are easy to audit for..

Jason