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)
commit882c0d1704cf61df13f01933269202d51e74b9f3
tree241eaf53fe246fae076728acf7ed476c280ae52d
parent6c9c7d8fbc3a2a0cfed0e7a5b39581847b632f0b
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