All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
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 0/2] hw/loader: keep the guest's BIOS on reset after qemu-update #VSTOR-155779
Date: Wed, 18 Nov 2026 12:47:37 +0100	[thread overview]
Message-ID: <20261118114739.2973860-1-den@openvz.org> (raw)

A VM started on 7.x and live-migrated to 8.0 pauses on its first reboot
after virsh qemu-update:

  KVM internal error. Suberror: 1
  ...
  emulation failure

Since f344758e7a0 rom_reset() returns before the INMIGRATE branch while
a cpr migration is incoming, so the cpr-exec target keeps the host's
BIOS image and writes it into pc.bios on the next guest reset. The
guest still runs the SeaBIOS it was started with from shadow RAM,
copies code from the new image over itself in qemu_reboot() and
crashes. Every VM that carries a pre-8.0 SeaBIOS into a qemu-update on
8.0 is hit. The field case is ASUP-4010, the RCA is in VSTOR-155779:

  https://virtuozzo.atlassian.net/browse/VSTOR-155779

Patch 1 treats an incoming cpr like an incoming migration in
rom_reset(). Patch 2 adds a migrate-cpr-exec case: the new QEMU gets a
BIOS file that differs in one byte, and after cpr-exec and system_reset
the ROM must still hold the image the guest started with.

Both patches apply to hci-8.0 and hci-8.1 as is. A VM updated by the
current QEMU that has not rebooted yet recovers with one more
qemu-update to the fixed build. hci-7.4 has the same bug in a
different shape; its fix is sent separately.

Tested on dev-cl04 (vz10 kernel) on both branches: migrate-cpr-exec
passes, and with patch 1 reverted only the new case fails, with the
new image in the ROM.

Denis V. Lunev (2):
  hw/loader: stop rom_reset() overwriting the BIOS after cpr-exec
    #VSTOR-155779
  iotests/migrate-cpr-exec: cover a guest reset with a new BIOS file
    #VSTOR-155779

 hw/core/loader.c                              | 12 ++----
 tests/qemu-iotests/tests/migrate-cpr-exec     | 38 +++++++++++++++++++
 tests/qemu-iotests/tests/migrate-cpr-exec.out |  4 +-
 3 files changed, 44 insertions(+), 10 deletions(-)


base-commit: e139ba63e8fb5a7d03bbe72e8ca435199d5b51ce
-- 
2.55.0


             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 Denis V. Lunev [this message]
2026-11-18 11:47 ` [PATCH hci-8.0/8.1 1/2] hw/loader: stop rom_reset() overwriting the BIOS after cpr-exec #VSTOR-155779 Denis V. Lunev
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-1-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.