f06b222ece
Most importantly, fix forwards and backwards migration with VirtIO-GPU display. Other fixes are for a regression in pflash device (introduced in 8.2) and some fixes for x86(_64) TCG emulation. One of the patches needed to be adapted, because it removed a helper that is still in use in 9.0.0. There also is a revert for a fix in VirtIO PCI devices that turned out to cause some issues, see the revert itself for more details. Lastly, there is a change to move compatibility flags for a new VirtIO-net feature to the correct machine type. The feature was introduced in QEMU 8.2, but the compatibility flags got added to machine version 8.0 instead of 8.1. This breaks backwards migration with machine version 8.1 from a 8.2/9.0 binary to an 8.1 binary, in cases where the guest kernel enables the feature (e.g. Ubuntu 23.10). While that breaks migration with machine version 8.1 from an unpatched to a patched binary, Proxmox VE only ever had 8.2 on the test repository and 9.0 not yet in any public repository. An upstream developer suggested it is the proper fix [0]. Upstream submission [1]. [0]: https://lore.kernel.org/qemu-devel/CACGkMEtZrJuhof+hUGVRvLLQE+8nQE5XmSHpT0NAQ1EpnqfmsA@mail.gmail.com/T/#u [1]: https://lore.kernel.org/qemu-devel/20240517075336.104091-1-f.ebner@proxmox.com/T/#u Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
60 lines
2.4 KiB
Diff
60 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
Date: Thu, 16 May 2024 10:46:34 +0200
|
|
Subject: [PATCH] hw/pflash: fix block write start
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Move the pflash_blk_write_start() call. We need the offset of the
|
|
first data write, not the offset for the setup (number-of-bytes)
|
|
write. Without this fix u-boot can do block writes to the first
|
|
flash block only.
|
|
|
|
While being at it drop a leftover FIXME.
|
|
|
|
Cc: qemu-stable@nongnu.org
|
|
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2343
|
|
Fixes: fcc79f2e0955 ("hw/pflash: implement update buffer for block writes")
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
|
|
(picked up from https://lists.nongnu.org/archive/html/qemu-stable/2024-05/msg00091.html)
|
|
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
|
|
---
|
|
hw/block/pflash_cfi01.c | 8 +++-----
|
|
1 file changed, 3 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
|
|
index 1bda8424b9..c8f1cf5a87 100644
|
|
--- a/hw/block/pflash_cfi01.c
|
|
+++ b/hw/block/pflash_cfi01.c
|
|
@@ -518,10 +518,6 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offset,
|
|
break;
|
|
case 0xe8: /* Write to buffer */
|
|
trace_pflash_write(pfl->name, "write to buffer");
|
|
- /* FIXME should save @offset, @width for case 1+ */
|
|
- qemu_log_mask(LOG_UNIMP,
|
|
- "%s: Write to buffer emulation is flawed\n",
|
|
- __func__);
|
|
pfl->status |= 0x80; /* Ready! */
|
|
break;
|
|
case 0xf0: /* Probe for AMD flash */
|
|
@@ -574,7 +570,6 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offset,
|
|
}
|
|
pfl->counter = value;
|
|
pfl->wcycle++;
|
|
- pflash_blk_write_start(pfl, offset);
|
|
break;
|
|
case 0x60:
|
|
if (cmd == 0xd0) {
|
|
@@ -605,6 +600,9 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offset,
|
|
switch (pfl->cmd) {
|
|
case 0xe8: /* Block write */
|
|
/* FIXME check @offset, @width */
|
|
+ if (pfl->blk_offset == -1 && pfl->counter) {
|
|
+ pflash_blk_write_start(pfl, offset);
|
|
+ }
|
|
if (!pfl->ro && (pfl->blk_offset != -1)) {
|
|
pflash_data_write(pfl, offset, value, width, be);
|
|
} else {
|