From 7b0ab8bdd949d4d71b635c0a9f8f2634f597b72a Mon Sep 17 00:00:00 2001 From: Jiabo Feng Date: Wed, 14 May 2025 14:41:22 +0800 Subject: [PATCH] QEMU update to version 6.2.0-108: - vdpa:Fix dirty page bitmap synchronization not done after suspend for vdpa devices Signed-off-by: Jiabo Feng (cherry picked from commit f19bb019f0d8e3fa0c7d87ce1fcddaefd4ac3b5b) --- qemu.spec | 6 ++- ...age-bitmap-synchronization-not-done-.patch | 39 +++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 vdpa-Fix-dirty-page-bitmap-synchronization-not-done-.patch diff --git a/qemu.spec b/qemu.spec index 887b98a..18d1068 100644 --- a/qemu.spec +++ b/qemu.spec @@ -3,7 +3,7 @@ Name: qemu Version: 6.2.0 -Release: 107 +Release: 108 Epoch: 10 Summary: QEMU is a generic and open source machine emulator and virtualizer License: GPLv2 and BSD and MIT and CC-BY-SA-4.0 @@ -1182,6 +1182,7 @@ Patch1167: linux-aio-fix-unbalanced-plugged-counter-in-laio_io_.patch Patch1168: qapi-qom-Define-cache-enumeration-and-properties-for.patch Patch1169: hw-core-machine-smp-Initialize-caches_bitmap-before-.patch Patch1170: qemu-Support-specifying-the-cache-size-presented-to-.patch +Patch1171: vdpa-Fix-dirty-page-bitmap-synchronization-not-done-.patch BuildRequires: flex BuildRequires: gcc @@ -1780,6 +1781,9 @@ getent passwd qemu >/dev/null || \ %endif %changelog +* Wed May 14 2025 - 10:6.2.0-108 +- vdpa:Fix dirty page bitmap synchronization not done after suspend for vdpa devices + * Wed Mar 26 2025 - 10:6.2.0-107 - qemu: Support specifying the cache size presented to guest - hw/core/machine-smp: Initialize caches_bitmap before reading diff --git a/vdpa-Fix-dirty-page-bitmap-synchronization-not-done-.patch b/vdpa-Fix-dirty-page-bitmap-synchronization-not-done-.patch new file mode 100644 index 0000000..c0b49df --- /dev/null +++ b/vdpa-Fix-dirty-page-bitmap-synchronization-not-done-.patch @@ -0,0 +1,39 @@ +From 7a8e59e39b342574852c18851f3926742f0adc0c Mon Sep 17 00:00:00 2001 +From: Adttil <2429917001@qq.com> +Date: Thu, 24 Apr 2025 09:47:45 +0800 +Subject: [PATCH] vdpa:Fix dirty page bitmap synchronization not done after + suspend for vdpa devices + +Change the flag for vdpa device to determine whether to perform log_sync +from dev->started to dev->log, and do not release dev->log after vdpa device +suspend, and release it uniformly by vhost_dev_stop. + +Signed-off-by: Adttil <2429917001@qq.com> +--- + hw/virtio/vhost.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c +index ed1506d3e0..91b0019469 100644 +--- a/hw/virtio/vhost.c ++++ b/hw/virtio/vhost.c +@@ -288,7 +288,7 @@ static void vhost_log_sync(MemoryListener *listener, + memory_listener); + MigrationState *ms = migrate_get_current(); + +- if (!dev->log_enabled || !dev->started) { ++ if (!dev->log_enabled || !dev->log) { + return; + } + +@@ -2327,7 +2327,6 @@ int vhost_dev_suspend(struct vhost_dev *hdev, VirtIODevice *vdev, bool vrings) + memory_listener_unregister(&hdev->iommu_listener); + } + vhost_stop_config_intr(hdev); +- vhost_log_put(hdev, true); + hdev->started = false; + vdev->vhost_started = false; + hdev->vdev = NULL; +-- +2.41.0.windows.1 + -- Gitee