summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorJason A. Donenfeld2022-10-25 02:43:19 +0200
committerPeter Maydell2022-10-27 12:34:31 +0200
commit14b29fea742034186403914b4d013d0e83f19e78 (patch)
tree15088b24c572a6ebc91c7cf202bfc4fcea3fb40a /hw
parentdevice-tree: add re-randomization helper function (diff)
downloadqemu-14b29fea742034186403914b4d013d0e83f19e78.tar.gz
qemu-14b29fea742034186403914b4d013d0e83f19e78.tar.xz
qemu-14b29fea742034186403914b4d013d0e83f19e78.zip
x86: do not re-randomize RNG seed on snapshot load
Snapshot loading is supposed to be deterministic, so we shouldn't re-randomize the various seeds used. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Message-id: 20221025004327.568476-4-Jason@zx2c4.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/i386/x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index 1148f70c03..bd50a064a3 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -1111,7 +1111,7 @@ void x86_load_linux(X86MachineState *x86ms,
setup_data->type = cpu_to_le32(SETUP_RNG_SEED);
setup_data->len = cpu_to_le32(RNG_SEED_LENGTH);
qemu_guest_getrandom_nofail(setup_data->data, RNG_SEED_LENGTH);
- qemu_register_reset(reset_rng_seed, setup_data);
+ qemu_register_reset_nosnapshotload(reset_rng_seed, setup_data);
fw_cfg_add_bytes_callback(fw_cfg, FW_CFG_KERNEL_DATA, reset_rng_seed, NULL,
setup_data, kernel, kernel_size, true);
} else {