docs/devel: Mention post_load hook restrictions where we document the hook
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 3 Oct 2024 14:34:01 +0000 (15:34 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 4 Oct 2024 15:54:55 +0000 (18:54 +0300)
commite300f4c11dae9be4cc2f44837fe6e560576cc27f
tree569a1fb7bfb7d8b11caa45633c6f5c87a4b182b6
parentdb17daf8c43a321f62f8bc46ea0f4a76e16b386f
docs/devel: Mention post_load hook restrictions where we document the hook

Accessing another device in a post_load hook is a bad idea, because
the order of device save/restore is not fixed, and so this
cross-device access makes the save/restore non-deterministic.

We previously only flagged up this requirement in the
record-and-replay developer docs; repeat it in the main migration
documentation, where a developer trying to implement a post_load hook
is more likely to see it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
docs/devel/migration/main.rst
docs/devel/replay.rst