Re: [PATCH 3/4] migration: Use MigrationStatus instead of int

2024-06-13 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Jun 12, 2024 at 10:42:27AM -0400, Peter Xu wrote: >> @@ -1544,7 +1545,7 @@ bool migration_in_postcopy(void) >> } >> } >> >> -bool migration_postcopy_is_alive(int state) >> +bool migration_postcopy_is_alive(MigrationStatus state) >> { >> switch (state) {

Re: [PATCH 3/4] migration: Use MigrationStatus instead of int

2024-06-13 Thread Peter Xu
On Thu, Jun 13, 2024 at 11:59:20AM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Wed, Jun 12, 2024 at 10:42:27AM -0400, Peter Xu wrote: > >> @@ -1544,7 +1545,7 @@ bool migration_in_postcopy(void) > >> } > >> } > >> > >> -bool migration_postcopy_is_alive(int state) > >> +bool

Re: [PATCH 3/4] migration: Use MigrationStatus instead of int

2024-06-12 Thread Peter Xu
On Wed, Jun 12, 2024 at 10:42:27AM -0400, Peter Xu wrote: > @@ -1544,7 +1545,7 @@ bool migration_in_postcopy(void) > } > } > > -bool migration_postcopy_is_alive(int state) > +bool migration_postcopy_is_alive(MigrationStatus state) > { > switch (state) { > case

[PATCH 3/4] migration: Use MigrationStatus instead of int

2024-06-12 Thread Peter Xu
QEMU uses "int" in most cases even if it stores MigrationStatus. I don't know why, so let's try to do that right and see what blows up.. Signed-off-by: Peter Xu --- migration/migration.h | 9 + migration/migration.c | 13 +++-- 2 files changed, 12 insertions(+), 10