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 00/14] vfio/migration: Implement VFIO migration protocol v2

2023-01-06 Thread Jason Gunthorpe
On Fri, Jan 06, 2023 at 04:36:09PM -0700, Alex Williamson wrote: > Missing from the series is the all important question of what happens > to "x-enable-migration" now. We have two in-kernel drivers supporting > v2 migration, so while hardware and firmware may still be difficult to > bring togethe

Re: [PATCH v3 12/17] vfio/migration: Implement VFIO migration protocol v2

2022-11-28 Thread Jason Gunthorpe
On Mon, Nov 28, 2022 at 01:36:30PM -0700, Alex Williamson wrote: > On Mon, 28 Nov 2022 15:40:23 -0400 > Jason Gunthorpe wrote: > > > On Mon, Nov 28, 2022 at 11:50:03AM -0700, Alex Williamson wrote: > > > > > There's a claim here about added complexity that I&

Re: [PATCH v3 12/17] vfio/migration: Implement VFIO migration protocol v2

2022-11-28 Thread Jason Gunthorpe
On Mon, Nov 28, 2022 at 11:50:03AM -0700, Alex Williamson wrote: > There's a claim here about added complexity that I'm not really seeing. > It looks like we simply make an ioctl call here and scale our buffer > based on the minimum of the returned device estimate or our upper > bound. I'm not ke

Re: [PATCH v3 12/17] vfio/migration: Implement VFIO migration protocol v2

2022-11-17 Thread Jason Gunthorpe
On Thu, Nov 17, 2022 at 07:07:10PM +0200, Avihai Horon wrote: > > > +} > > > + > > > +if (mig_state->data_fd != -1) { > > > +if (migration->data_fd != -1) { > > > +/* > > > + * This can happen if the device is asynchronously reset and > > > + * te

Re: [RFC 7/7] migration: call qemu_savevm_state_pending_exact() with the guest stopped

2022-10-18 Thread Jason Gunthorpe
On Fri, Oct 14, 2022 at 01:29:51PM +0100, Joao Martins wrote: > On 14/10/2022 12:28, Juan Quintela wrote: > > Joao Martins wrote: > >> On 13/10/2022 17:08, Juan Quintela wrote: > >>> Oops. My understanding was that once the guest is stopped you can say > >>> how big is it. > > > > Hi > > > >>

Re: [RFC 7/7] migration: call qemu_savevm_state_pending_exact() with the guest stopped

2022-10-15 Thread Jason Gunthorpe
On Thu, Oct 13, 2022 at 01:25:10PM +0100, Joao Martins wrote: > It would allow supporting both the (current UAPI) case where you need to > transfer the state to get device state size (so checking against > threshold_size > pending_pre constantly would allow to not violate the SLA) as well as any