Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-19 Thread Cédric Le Goater
On 3/15/24 15:52, Peter Xu wrote: On Fri, Mar 15, 2024 at 03:21:27PM +0100, Cédric Le Goater wrote: On 3/15/24 13:20, Cédric Le Goater wrote: On 3/15/24 12:01, Peter Xu wrote: On Fri, Mar 15, 2024 at 11:17:45AM +0100, Cédric Le Goater wrote: migrate_set_state is also unintuitive because it ig

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Peter Xu
On Fri, Mar 15, 2024 at 03:31:28PM +0100, Cédric Le Goater wrote: > On 3/15/24 14:11, Peter Xu wrote: > > On Fri, Mar 15, 2024 at 01:20:49PM +0100, Cédric Le Goater wrote: > > > +static void qemu_savevm_wait_unplug(MigrationState *s, int state) > > > > One more trivial comment: I'd even consider d

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Peter Xu
On Fri, Mar 15, 2024 at 03:21:27PM +0100, Cédric Le Goater wrote: > On 3/15/24 13:20, Cédric Le Goater wrote: > > On 3/15/24 12:01, Peter Xu wrote: > > > On Fri, Mar 15, 2024 at 11:17:45AM +0100, Cédric Le Goater wrote: > > > > > migrate_set_state is also unintuitive because it ignores invalid stat

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Cédric Le Goater
On 3/15/24 14:11, Peter Xu wrote: On Fri, Mar 15, 2024 at 01:20:49PM +0100, Cédric Le Goater wrote: +static void qemu_savevm_wait_unplug(MigrationState *s, int state) One more trivial comment: I'd even consider dropping "state" altogether, as this should be the only state this function should

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Cédric Le Goater
On 3/15/24 14:09, Peter Xu wrote: On Fri, Mar 15, 2024 at 01:20:49PM +0100, Cédric Le Goater wrote: On 3/15/24 12:01, Peter Xu wrote: On Fri, Mar 15, 2024 at 11:17:45AM +0100, Cédric Le Goater wrote: migrate_set_state is also unintuitive because it ignores invalid state transitions and we've b

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Cédric Le Goater
On 3/15/24 13:20, Cédric Le Goater wrote: On 3/15/24 12:01, Peter Xu wrote: On Fri, Mar 15, 2024 at 11:17:45AM +0100, Cédric Le Goater wrote: migrate_set_state is also unintuitive because it ignores invalid state transitions and we've been using that property to deal with special states such as

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Peter Xu
On Fri, Mar 15, 2024 at 01:20:49PM +0100, Cédric Le Goater wrote: > +static void qemu_savevm_wait_unplug(MigrationState *s, int state) One more trivial comment: I'd even consider dropping "state" altogether, as this should be the only state this function should be invoked. So we can perhaps asser

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Peter Xu
On Fri, Mar 15, 2024 at 01:20:49PM +0100, Cédric Le Goater wrote: > On 3/15/24 12:01, Peter Xu wrote: > > On Fri, Mar 15, 2024 at 11:17:45AM +0100, Cédric Le Goater wrote: > > > > migrate_set_state is also unintuitive because it ignores invalid state > > > > transitions and we've been using that pr

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Cédric Le Goater
On 3/15/24 12:01, Peter Xu wrote: On Fri, Mar 15, 2024 at 11:17:45AM +0100, Cédric Le Goater wrote: migrate_set_state is also unintuitive because it ignores invalid state transitions and we've been using that property to deal with special states such as POSTCOPY_PAUSED and FAILED: - After the m

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Peter Xu
On Fri, Mar 15, 2024 at 11:17:45AM +0100, Cédric Le Goater wrote: > > migrate_set_state is also unintuitive because it ignores invalid state > > transitions and we've been using that property to deal with special > > states such as POSTCOPY_PAUSED and FAILED: > > > > - After the migration goes int

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-15 Thread Cédric Le Goater
On 3/12/24 19:28, Fabiano Rosas wrote: Peter Xu writes: On Tue, Mar 12, 2024 at 11:24:39AM -0300, Fabiano Rosas wrote: Cédric Le Goater writes: On 3/12/24 14:34, Cédric Le Goater wrote: On 3/12/24 13:32, Cédric Le Goater wrote: On 3/11/24 20:03, Fabiano Rosas wrote: Cédric Le Goater wr

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-12 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Mar 12, 2024 at 11:24:39AM -0300, Fabiano Rosas wrote: >> Cédric Le Goater writes: >> >> > On 3/12/24 14:34, Cédric Le Goater wrote: >> >> On 3/12/24 13:32, Cédric Le Goater wrote: >> >>> On 3/11/24 20:03, Fabiano Rosas wrote: >> Cédric Le Goater writes: >>

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-12 Thread Cédric Le Goater
[ ...] Now VFIO allows a migration to happen without this trick. I'm wondering whether all relevant NICs can also support VFIO migrations in the future, then we can drop this tricky feature for good. Currently, VFIO migration requires a VFIO (PCI) variant driver implementing the specific ops

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-12 Thread Peter Xu
On Tue, Mar 12, 2024 at 11:24:39AM -0300, Fabiano Rosas wrote: > Cédric Le Goater writes: > > > On 3/12/24 14:34, Cédric Le Goater wrote: > >> On 3/12/24 13:32, Cédric Le Goater wrote: > >>> On 3/11/24 20:03, Fabiano Rosas wrote: > Cédric Le Goater writes: > > > On 3/8/24 15:36, Fa

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-12 Thread Fabiano Rosas
Cédric Le Goater writes: > On 3/12/24 14:34, Cédric Le Goater wrote: >> On 3/12/24 13:32, Cédric Le Goater wrote: >>> On 3/11/24 20:03, Fabiano Rosas wrote: Cédric Le Goater writes: > On 3/8/24 15:36, Fabiano Rosas wrote: >> Cédric Le Goater writes: >> >>> This prepare

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-12 Thread Cédric Le Goater
On 3/12/24 14:34, Cédric Le Goater wrote: On 3/12/24 13:32, Cédric Le Goater wrote: On 3/11/24 20:03, Fabiano Rosas wrote: Cédric Le Goater writes: On 3/8/24 15:36, Fabiano Rosas wrote: Cédric Le Goater writes: This prepares ground for the changes coming next which add an Error** argumen

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-12 Thread Cédric Le Goater
On 3/12/24 13:32, Cédric Le Goater wrote: On 3/11/24 20:03, Fabiano Rosas wrote: Cédric Le Goater writes: On 3/8/24 15:36, Fabiano Rosas wrote: Cédric Le Goater writes: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-12 Thread Cédric Le Goater
On 3/11/24 21:10, Peter Xu wrote: On Mon, Mar 11, 2024 at 04:03:14PM -0300, Fabiano Rosas wrote: Cédric Le Goater writes: On 3/8/24 15:36, Fabiano Rosas wrote: Cédric Le Goater writes: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() hand

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-12 Thread Cédric Le Goater
On 3/11/24 20:03, Fabiano Rosas wrote: Cédric Le Goater writes: On 3/8/24 15:36, Fabiano Rosas wrote: Cédric Le Goater writes: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() now handle the er

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-11 Thread Peter Xu
On Mon, Mar 11, 2024 at 07:12:11PM +0100, Cédric Le Goater wrote: > On 3/8/24 15:17, Peter Xu wrote: > > On Fri, Mar 08, 2024 at 02:55:30PM +0100, Cédric Le Goater wrote: > > > On 3/8/24 14:39, Cédric Le Goater wrote: > > > > On 3/8/24 14:14, Cédric Le Goater wrote: > > > > > On 3/8/24 13:56, Peter

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-11 Thread Peter Xu
On Mon, Mar 11, 2024 at 04:03:14PM -0300, Fabiano Rosas wrote: > Cédric Le Goater writes: > > > On 3/8/24 15:36, Fabiano Rosas wrote: > >> Cédric Le Goater writes: > >> > >>> This prepares ground for the changes coming next which add an Error** > >>> argument to the .save_setup() handler. Calle

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-11 Thread Fabiano Rosas
Cédric Le Goater writes: > On 3/8/24 15:36, Fabiano Rosas wrote: >> Cédric Le Goater writes: >> >>> This prepares ground for the changes coming next which add an Error** >>> argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() >>> now handle the error and fail earlier set

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-11 Thread Cédric Le Goater
On 3/8/24 15:36, Fabiano Rosas wrote: Cédric Le Goater writes: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() now handle the error and fail earlier setting the migration state from MIGRATION_STAT

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-11 Thread Cédric Le Goater
On 3/8/24 15:17, Peter Xu wrote: On Fri, Mar 08, 2024 at 02:55:30PM +0100, Cédric Le Goater wrote: On 3/8/24 14:39, Cédric Le Goater wrote: On 3/8/24 14:14, Cédric Le Goater wrote: On 3/8/24 13:56, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:25PM +0100, Cédric Le Goater wrote: This prepare

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-08 Thread Fabiano Rosas
Cédric Le Goater writes: > This prepares ground for the changes coming next which add an Error** > argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() > now handle the error and fail earlier setting the migration state from > MIGRATION_STATUS_SETUP to MIGRATION_STATUS_FAIL

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-08 Thread Peter Xu
On Fri, Mar 08, 2024 at 02:55:30PM +0100, Cédric Le Goater wrote: > On 3/8/24 14:39, Cédric Le Goater wrote: > > On 3/8/24 14:14, Cédric Le Goater wrote: > > > On 3/8/24 13:56, Peter Xu wrote: > > > > On Wed, Mar 06, 2024 at 02:34:25PM +0100, Cédric Le Goater wrote: > > > > > This prepares ground f

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-08 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Mar 06, 2024 at 02:34:25PM +0100, Cédric Le Goater wrote: >> This prepares ground for the changes coming next which add an Error** >> argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() >> now handle the error and fail earlier setting the migrati

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-08 Thread Cédric Le Goater
On 3/8/24 14:39, Cédric Le Goater wrote: On 3/8/24 14:14, Cédric Le Goater wrote: On 3/8/24 13:56, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:25PM +0100, Cédric Le Goater wrote: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Call

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-08 Thread Cédric Le Goater
On 3/8/24 14:14, Cédric Le Goater wrote: On 3/8/24 13:56, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:25PM +0100, Cédric Le Goater wrote: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() now handl

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-08 Thread Cédric Le Goater
On 3/8/24 13:56, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:25PM +0100, Cédric Le Goater wrote: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() now handle the error and fail earlier setting the m

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-08 Thread Peter Xu
On Wed, Mar 06, 2024 at 02:34:25PM +0100, Cédric Le Goater wrote: > This prepares ground for the changes coming next which add an Error** > argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() > now handle the error and fail earlier setting the migration state from > MIGRATIO

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-07 Thread Fabiano Rosas
Cédric Le Goater writes: > This prepares ground for the changes coming next which add an Error** > argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() > now handle the error and fail earlier setting the migration state from > MIGRATION_STATUS_SETUP to MIGRATION_STATUS_FAIL

[PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-06 Thread Cédric Le Goater
This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() now handle the error and fail earlier setting the migration state from MIGRATION_STATUS_SETUP to MIGRATION_STATUS_FAILED. In qemu_savevm_state(), move t