From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH 6/6] reset: Add RESET_TYPE_SNAPSHOT_LOAD
Date: Fri, 12 Apr 2024 10:30:18 -0700 [thread overview]
Message-ID: <a70ebbc9-e414-4b45-b969-f66c41ac3b6e@linaro.org> (raw)
In-Reply-To: <20240412160809.1260625-7-peter.maydell@linaro.org>
On 4/12/24 09:08, Peter Maydell wrote:
> 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>
> ---
> docs/devel/reset.rst | 17 ++++++++++++++---
> include/hw/resettable.h | 1 +
> hw/core/reset.c | 15 ++++-----------
> hw/core/resettable.c | 4 ----
> 4 files changed, 19 insertions(+), 18 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2024-04-12 17:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 16:08 [PATCH 0/6] reset: Add RESET_TYPE_SNAPSHOT_LOAD Peter Maydell
2024-04-12 16:08 ` [PATCH 1/6] hw/misc: Don't special case RESET_TYPE_COLD in npcm7xx_clk, gcr Peter Maydell
2024-04-12 17:21 ` Richard Henderson
2024-04-12 17:32 ` Philippe Mathieu-Daudé
2024-04-16 9:08 ` Luc Michel
2024-04-12 16:08 ` [PATCH 2/6] allwinner-i2c, adm1272: Use device_cold_reset() for software-triggered reset Peter Maydell
2024-04-12 17:22 ` Richard Henderson
2024-04-16 9:09 ` Luc Michel
2024-04-12 16:08 ` [PATCH 3/6] scripts/coccinelle: New script to add ResetType to hold and exit phases Peter Maydell
2024-04-16 9:10 ` Luc Michel
2024-04-12 16:08 ` [PATCH 4/6] hw, target: Add ResetType argument to hold and exit phase methods Peter Maydell
2024-04-12 16:49 ` Edgar E. Iglesias
2024-04-12 17:27 ` Richard Henderson
2024-04-16 9:10 ` Luc Michel
2024-04-12 16:08 ` [PATCH 5/6] docs/devel/reset: Update to new API for " Peter Maydell
2024-04-12 17:27 ` Richard Henderson
2024-04-12 17:29 ` Philippe Mathieu-Daudé
2024-04-16 9:10 ` Luc Michel
2024-04-12 16:08 ` [PATCH 6/6] reset: Add RESET_TYPE_SNAPSHOT_LOAD Peter Maydell
2024-04-12 17:30 ` Richard Henderson [this message]
2024-04-12 17:31 ` Philippe Mathieu-Daudé
2024-04-16 9:21 ` Luc Michel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a70ebbc9-e414-4b45-b969-f66c41ac3b6e@linaro.org \
--to=richard.henderson@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).