From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id BF5779472B for ; Thu, 12 Jan 2023 11:09:44 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9ECE128211 for ; Thu, 12 Jan 2023 11:09:14 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 12 Jan 2023 11:09:13 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 0AA524473C for ; Thu, 12 Jan 2023 11:09:13 +0100 (CET) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Thu, 12 Jan 2023 11:09:08 +0100 Message-Id: <20230112100908.69025-1-f.ebner@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.022 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH qemu] add regression fix for migration with virtio-rng device X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2023 10:09:44 -0000 between QEMU less than 7.2 and QEMU 7.2 without the fix (both directions are affected). As mentioned in the patch message, this fix itself will break migration between QEMU 7.2 and QEMU 7.2 with the fix (in both directions, if a virtio-rng device is attached), but this is fine, because no pve-qemu-kvm package with QEMU 7.2 has been publicly released yet. Signed-off-by: Fiona Ebner --- ...pci-fix-migration-compat-for-vectors.patch | 42 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 43 insertions(+) create mode 100644 debian/patches/extra/0006-virtio-rng-pci-fix-migration-compat-for-vectors.patch diff --git a/debian/patches/extra/0006-virtio-rng-pci-fix-migration-compat-for-vectors.patch b/debian/patches/extra/0006-virtio-rng-pci-fix-migration-compat-for-vectors.patch new file mode 100644 index 0000000..2673dd7 --- /dev/null +++ b/debian/patches/extra/0006-virtio-rng-pci-fix-migration-compat-for-vectors.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Dr. David Alan Gilbert" +Date: Mon, 9 Jan 2023 10:58:09 +0000 +Subject: [PATCH] virtio-rng-pci: fix migration compat for vectors + +Fixup the migration compatibility for existing machine types +so that they do not enable msi-x. + +Symptom: + +(qemu) qemu: get_pci_config_device: Bad config data: i=0x34 read: 84 device: 98 cmask: ff wmask: 0 w1cmask:0 +qemu: Failed to load PCIDevice:config +qemu: Failed to load virtio-rng:virtio +qemu: error while loading state for instance 0x0 of device '0000:00:03.0/virtio-rng' +qemu: load of migration failed: Invalid argument + +Note: This fix will break migration from 7.2->7.2-fixed with this patch + +bz: https://bugzilla.redhat.com/show_bug.cgi?id=2155749 +Fixes: 9ea02e8f1 ("virtio-rng-pci: Allow setting nvectors, so we can use MSI-X") + +Reviewed-by: Thomas Huth +Acked-by: David Daney +Signed-off-by: Dr. David Alan Gilbert +(picked-up from https://lists.nongnu.org/archive/html/qemu-devel/2023-01/msg01319.html) +Signed-off-by: Fiona Ebner +--- + hw/core/machine.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/hw/core/machine.c b/hw/core/machine.c +index 8d34caa31d..77a0a131d1 100644 +--- a/hw/core/machine.c ++++ b/hw/core/machine.c +@@ -42,6 +42,7 @@ + + GlobalProperty hw_compat_7_1[] = { + { "virtio-device", "queue_reset", "false" }, ++ { "virtio-rng-pci", "vectors", "0" }, + }; + const size_t hw_compat_7_1_len = G_N_ELEMENTS(hw_compat_7_1); + diff --git a/debian/patches/series b/debian/patches/series index 534f607..f8e3fe8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,6 +3,7 @@ extra/0002-init-daemonize-defuse-PID-file-resolve-error.patch extra/0003-virtio-mem-Fix-the-bitmap-index-of-the-section-offse.patch extra/0004-virtio-mem-Fix-the-iterator-variable-in-a-vmem-rdl_l.patch extra/0005-vhost-fix-vq-dirty-bitmap-syncing-when-vIOMMU-is-ena.patch +extra/0006-virtio-rng-pci-fix-migration-compat-for-vectors.patch bitmap-mirror/0001-drive-mirror-add-support-for-sync-bitmap-mode-never.patch bitmap-mirror/0002-drive-mirror-add-support-for-conditional-and-always-.patch bitmap-mirror/0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch -- 2.30.2