From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
Jean-Christophe Dubois <jcd@tribudubois.net>
Subject: Re: [PATCH for-11.2] hw/watchdog/wdt_imx2: Fix migration when pretimeout-support not enabled
Date: Tue, 24 Nov 2026 11:06:08 +0000 [thread overview]
Message-ID: <87se0qv68v.fsf@draig.linaro.org> (raw)
In-Reply-To: <20261116114641.1799526-1-peter.maydell@linaro.org> (Peter Maydell's message of "Mon, 16 Nov 2026 11:46:41 +0000")
Peter Maydell <peter.maydell@linaro.org> writes:
> The wdt_imx2 device has optional support for pretimeouts, which are
> present on most i.MX SoCs but not on i.MX31. If the QOM property
> 'pretimeout-support' is not set to true then we don't create the
> ptimer associated with that feature. However, the migration vmstate
> unconditionally lists that ptimer, with the result that trying to
> save the vmstate of an i.MX31-based machine like "kzm" will hit an
> assertion.
>
> Move the migration of 'itimer' into its own subsection which we only
> send when pretimeout support is enabled.
>
> This bug has existed in the code for a long time, but it was hidden
> until commit d9abd0253be ("hw/watchdog/wdt_imx2: Remove redundant
> attributes)" because a bug in the VMSTATE_PTIMER() macro together
> with the fact that the vmstate_imx2_wdt version_id was 0 meant that
> we weren't trying to migrate the device's ptimers at all, and so
> we avoided the assertion (but didn't migrate correctly).
>
> This is a migration compatibility break for this device, but it isn't
> used in any versioned machine types, and we've already decided to
> break compat on it this release cycle.
>
> Fixes: daca13d495a11 ("hw/watchdog: Implement full i.MX watchdog support")
> Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4876
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Based-on: 20261106163657.3825938-1-peter.maydell@linaro.org
> ("Fix 'version' arg of VMSTATE_PTIMER")
> -- the patch in that which sets minimum_version_id to 1 in
> the wdt_imx2 vmstate would otherwise be a conflict
LGTM
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2026-11-24 11:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 11:46 [PATCH for-11.2] hw/watchdog/wdt_imx2: Fix migration when pretimeout-support not enabled Peter Maydell
2026-11-17 5:50 ` Karl Mehltretter
2026-11-23 11:31 ` Peter Maydell
2026-11-24 11:06 ` Alex Bennée [this message]
2026-12-01 11:27 ` Bernhard Beschow
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=87se0qv68v.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=jcd@tribudubois.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.