spapr: Fix record-replay machine reset consuming too many events
commitb27fcb288bbdb9e2d89ce9ee578a8869f14c579c
authorNicholas Piggin <npiggin@gmail.com>
Tue, 8 Aug 2023 04:19:58 +0000 (8 14:19 +1000)
committerCédric Le Goater <clg@kaod.org>
Wed, 6 Sep 2023 09:19:33 +0000 (6 11:19 +0200)
tree86e0d262b9b252c8cf2c882ee969b8c786a33483
parent9c7b7f01f982a22b06c0d2f49a0d2466b5f34485
spapr: Fix record-replay machine reset consuming too many events

spapr_machine_reset gets a random number to populate the device-tree
rng seed with. When loading a snapshot for record-replay, the machine
is reset again, and that tries to consume the random event record
again, crashing due to inconsistent record

Fix this by saving the seed to populate the device tree with, and
skipping the rng on snapshot load.

Acked-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/ppc/spapr.c
include/hw/ppc/spapr.h