diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2024-04-12 17:08:09 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2024-04-25 10:21:59 +0100 |
| commit | 631f46d4ea7cb7ac0e529aacc1e7d832473f96c3 (patch) | |
| tree | 9fb50b1412c0c4a12ec3d371b30d65c3556630b5 /util/bufferiszero.c | |
| parent | 41d49ec190db9171d2ebb158fd4d5daad06ed8e1 (diff) | |
| download | focaccia-qemu-631f46d4ea7cb7ac0e529aacc1e7d832473f96c3.tar.gz focaccia-qemu-631f46d4ea7cb7ac0e529aacc1e7d832473f96c3.zip | |
reset: Add RESET_TYPE_SNAPSHOT_LOAD
Some devices and machines need to handle the reset before a vmsave snapshot is loaded differently -- the main user is the handling of RNG seed information, which does not want to put a new RNG seed into a ROM blob when we are doing a snapshot load. Currently this kind of reset handling is supported only for: * TYPE_MACHINE reset methods, which take a ShutdownCause argument * reset functions registered with qemu_register_reset_nosnapshotload To allow a three-phase-reset device to also distinguish "snapshot load" reset from the normal kind, add a new ResetType RESET_TYPE_SNAPSHOT_LOAD. All our existing reset methods ignore the reset type, so we don't need to update any device code. Add the enum type, and make qemu_devices_reset() use the right reset type for the ShutdownCause it is passed. This allows us to get rid of the device_reset_reason global we were using to implement qemu_register_reset_nosnapshotload(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Luc Michel <luc.michel@amd.com> Message-id: 20240412160809.1260625-7-peter.maydell@linaro.org
Diffstat (limited to 'util/bufferiszero.c')
0 files changed, 0 insertions, 0 deletions