]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mobility: wait for memory transfer to complete
authorLaurent Dufour <ldufour@linux.ibm.com>
Wed, 13 Jul 2022 15:47:26 +0000 (17:47 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 25 Jul 2022 03:28:45 +0000 (13:28 +1000)
commitbeb1ffe161817194a375cbf707651558eb7c7c1d
tree241eaf53fe246fae076728acf7ed476c280ae52d
parente594c1768618ea0b99d1674328b13aa1d502a717
powerpc/mobility: wait for memory transfer to complete

In pseries_migration_partition(), loop until the memory transfer is
complete. This way the calling drmgr process will not exit earlier,
allowing callbacks to be run only once the migration is fully completed.

If reading the VASI state is done after the hypervisor has completed the
migration, the HCALL is returning H_PARAMETER. We can safely assume that
the memory transfer is achieved if this happens.

This will also allow to manage the NMI watchdog state in the next commits.

Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
Reviewed-by: Nathan Lynch <nathanl@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220713154729.80789-2-ldufour@linux.ibm.com
arch/powerpc/platforms/pseries/mobility.c