From: "Denis V. Lunev" <den@openvz.org>
To: svt-core@virtuozzo.com
Cc: andrey.drobyshev@virtuozzo.com, den@openvz.org
Subject: [PATCH hci-8.0/8.1 1/2] hw/loader: stop rom_reset() overwriting the BIOS after cpr-exec #VSTOR-155779
Date: Wed, 18 Nov 2026 12:47:38 +0100 [thread overview]
Message-ID: <20261118114739.2973860-2-den@openvz.org> (raw)
In-Reply-To: <20261118114739.2973860-1-den@openvz.org>
From: Denis V. Lunev <den@openvz.org>
Since f344758e7a0 rom_reset() returns early while a cpr migration is
incoming. The return comes before the INMIGRATE branch that drops the
data of isrom ROMs, so the new QEMU keeps the BIOS image it loaded from
the host, and the first guest reset after qemu-update copies that image
into pc.bios.
The guest does not re-enter through the ROM. PAM is not reset, so
SeaBIOS runs from shadow RAM, finds HaveRunPost set and copies its code
back from the high ROM alias in qemu_reboot(). When the host's
bios-256k.bin is a different build from the one the guest started with,
SeaBIOS overwrites the code it is running and the vCPU stops with "KVM
internal error. Suberror: 1". Every VM started on 7.x and live-migrated
to 8.0 pauses this way on its first reboot after qemu-update.
Treat an incoming cpr like an incoming migration: drop the data of
isrom ROMs and write nothing. The cpr-exec target runs with -incoming
and is in INMIGRATE already, but the check does not rely on that.
Fixes: f344758e7a0 ("migration/cpr: avoid resetting ROMs on qemu-update #VSTOR-101576")
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
hw/core/loader.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/hw/core/loader.c b/hw/core/loader.c
index faa03b79e25..31f7f04b999 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -1202,21 +1202,17 @@ static void rom_reset(void *unused)
{
Rom *rom;
- if (cpr_is_incoming()) {
- /* No need to reset any ROM on CPR */
- return;
- }
-
QTAILQ_FOREACH(rom, &roms, next) {
if (rom->fw_file) {
continue;
}
/*
* We don't need to fill in the RAM with ROM data because we'll fill
- * the data in during the next incoming migration in all cases. Note
- * that some of those RAMs can actually be modified by the guest.
+ * the data in during the next incoming migration in all cases, and
+ * CPR keeps the RAM in place. Note that some of those RAMs can
+ * actually be modified by the guest.
*/
- if (runstate_check(RUN_STATE_INMIGRATE)) {
+ if (runstate_check(RUN_STATE_INMIGRATE) || cpr_is_incoming()) {
if (rom->data && rom->isrom) {
/*
* Free it so that a rom_reset after migration doesn't
--
2.55.0
next prev parent reply other threads:[~2026-11-18 11:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 11:47 [PATCH hci-8.0/8.1 0/2] hw/loader: keep the guest's BIOS on reset after qemu-update #VSTOR-155779 Denis V. Lunev
2026-11-18 11:47 ` Denis V. Lunev [this message]
2026-11-18 11:47 ` [PATCH hci-8.0/8.1 2/2] iotests/migrate-cpr-exec: cover a guest reset with a new BIOS file #VSTOR-155779 Denis V. Lunev
2026-11-18 14:11 ` [PATCH hci-8.0/8.1 0/2] hw/loader: keep the guest's BIOS on reset after qemu-update #VSTOR-155779 Andrey Drobyshev
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=20261118114739.2973860-2-den@openvz.org \
--to=den@openvz.org \
--cc=andrey.drobyshev@virtuozzo.com \
--cc=svt-core@virtuozzo.com \
/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.