Re: [PATCH v5 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-01-11 Thread Avihai Horon
On 10/01/2023 18:19, Cédric Le Goater wrote: External email: Use caution opening links or attachments Hello Avihai On 1/10/23 15:08, Avihai Horon wrote: On 09/01/2023 20:36, Jason Gunthorpe wrote: On Mon, Jan 09, 2023 at 06:27:21PM +0100, Cédric Le Goater wrote: also, in vfio_migration_q

Re: [PATCH v5 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-01-10 Thread Cédric Le Goater
Hello Avihai On 1/10/23 15:08, Avihai Horon wrote: On 09/01/2023 20:36, Jason Gunthorpe wrote: On Mon, Jan 09, 2023 at 06:27:21PM +0100, Cédric Le Goater wrote: also, in vfio_migration_query_flags() :    +static int vfio_migration_query_flags(VFIODevice *vbasedev, uint64_t *mig_flags)    +{

Re: [PATCH v5 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-01-10 Thread Avihai Horon
On 09/01/2023 20:36, Jason Gunthorpe wrote: On Mon, Jan 09, 2023 at 06:27:21PM +0100, Cédric Le Goater wrote: also, in vfio_migration_query_flags() : +static int vfio_migration_query_flags(VFIODevice *vbasedev, uint64_t *mig_flags) +{ +uint64_t buf[DIV_ROUND_UP(sizeof(struct vfi

Re: [PATCH v5 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-01-09 Thread Jason Gunthorpe
On Mon, Jan 09, 2023 at 06:27:21PM +0100, Cédric Le Goater wrote: > also, in vfio_migration_query_flags() : > > +static int vfio_migration_query_flags(VFIODevice *vbasedev, uint64_t > *mig_flags) > +{ > +uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature) + > +

Re: [PATCH v5 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-01-09 Thread Cédric Le Goater
On 1/9/23 16:12, Avihai Horon wrote: On 09/01/2023 12:20, Cédric Le Goater wrote: External email: Use caution opening links or attachments Hello Avihai, On 12/29/22 12:03, Avihai Horon wrote: +static int vfio_save_setup(QEMUFile *f, void *opaque) +{ +    VFIODevice *vbasedev = opaque; +  

Re: [PATCH v5 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-01-09 Thread Avihai Horon
On 09/01/2023 12:20, Cédric Le Goater wrote: External email: Use caution opening links or attachments Hello Avihai, On 12/29/22 12:03, Avihai Horon wrote: +static int vfio_save_setup(QEMUFile *f, void *opaque) +{ +    VFIODevice *vbasedev = opaque; +    VFIOMigration *migration = vbasedev

Re: [PATCH v5 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-01-09 Thread Cédric Le Goater
Hello Avihai, On 12/29/22 12:03, Avihai Horon wrote: +static int vfio_save_setup(QEMUFile *f, void *opaque) +{ +VFIODevice *vbasedev = opaque; +VFIOMigration *migration = vbasedev->migration; +uint64_t stop_copy_size; + +qemu_put_be64(f, VFIO_MIG_FLAG_DEV_SETUP_STATE); + +

[PATCH v5 10/14] vfio/migration: Implement VFIO migration protocol v2

2022-12-29 Thread Avihai Horon
Implement the basic mandatory part of VFIO migration protocol v2. This includes all functionality that is necessary to support VFIO_MIGRATION_STOP_COPY part of the v2 protocol. The two protocols, v1 and v2, will co-exist and in the following patches v1 protocol code will be removed. There are sev