aboutsummaryrefslogtreecommitdiff
path: root/include/hw/ppc
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2023-08-08 14:19:58 +1000
committerCédric Le Goater <clg@kaod.org>2023-09-06 11:19:33 +0200
commitb27fcb288bbdb9e2d89ce9ee578a8869f14c579c (patch)
tree86e0d262b9b252c8cf2c882ee969b8c786a33483 /include/hw/ppc
parent9c7b7f01f982a22b06c0d2f49a0d2466b5f34485 (diff)
downloadqemu-b27fcb288bbdb9e2d89ce9ee578a8869f14c579c.zip
qemu-b27fcb288bbdb9e2d89ce9ee578a8869f14c579c.tar.gz
qemu-b27fcb288bbdb9e2d89ce9ee578a8869f14c579c.tar.bz2
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>
Diffstat (limited to 'include/hw/ppc')
-rw-r--r--include/hw/ppc/spapr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index f47e841..f4bd204 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -204,6 +204,7 @@ struct SpaprMachineState {
uint32_t fdt_size;
uint32_t fdt_initial_size;
void *fdt_blob;
+ uint8_t fdt_rng_seed[32];
long kernel_size;
bool kernel_le;
uint64_t kernel_addr;