thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-virtio-rng-pci-fix-migration-compat-for-vectors.patch

ed5979
From 35ffe28a91a2ef08dd181d1a22695050ccbb6995 Mon Sep 17 00:00:00 2001
ed5979
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
ed5979
Date: Mon, 9 Jan 2023 16:04:43 +0000
ed5979
Subject: [PATCH 1/2] virtio-rng-pci: fix migration compat for vectors
ed5979
ed5979
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
ed5979
RH-MergeRequest: 131: virtio-rng-pci: fix migration compat for vectors
ed5979
RH-Bugzilla: 2155749
ed5979
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
ed5979
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
ed5979
RH-Acked-by: Thomas Huth <thuth@redhat.com>
ed5979
RH-Commit: [1/1] 1a866491dd191b073d71ae1aa5f4d76ee885de6d (dagrh/c-9-s-qemu-kvm)
ed5979
ed5979
Fixup the migration compatibility for existing machine types
ed5979
so that they do not enable msi-x.
ed5979
ed5979
Symptom:
ed5979
ed5979
(qemu) qemu: get_pci_config_device: Bad config data: i=0x34 read: 84 device: 98 cmask: ff wmask: 0 w1cmask:0
ed5979
qemu: Failed to load PCIDevice:config
ed5979
qemu: Failed to load virtio-rng:virtio
ed5979
qemu: error while loading state for instance 0x0 of device '0000:00:03.0/virtio-rng'
ed5979
qemu: load of migration failed: Invalid argument
ed5979
ed5979
Note: This fix will break migration from 7.2->7.2-fixed with this patch
ed5979
ed5979
bz: https://bugzilla.redhat.com/show_bug.cgi?id=2155749
ed5979
Fixes: 9ea02e8f1 ("virtio-rng-pci: Allow setting nvectors, so we can use MSI-X")
ed5979
ed5979
This downstream fix is the equivalent of an upstream fix I've posted to
ed5979
the 7.2 machine type compatibility.
ed5979
ed5979
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
ed5979
---
ed5979
 hw/core/machine.c | 2 ++
ed5979
 1 file changed, 2 insertions(+)
ed5979
ed5979
diff --git a/hw/core/machine.c b/hw/core/machine.c
ed5979
index 3d851d34da..7adbac6f87 100644
ed5979
--- a/hw/core/machine.c
ed5979
+++ b/hw/core/machine.c
ed5979
@@ -56,6 +56,8 @@ GlobalProperty hw_compat_rhel_9_1[] = {
ed5979
   { "nvme-ns", "eui64-default", "on"},
ed5979
   /* hw_compat_rhel_9_1 from hw_compat_7_1 */
ed5979
   { "virtio-device", "queue_reset", "false" },
ed5979
+  /* hw_compat_rhel_9_1 bz 2155749 */
ed5979
+  { "virtio-rng-pci", "vectors", "0" },
ed5979
 };
ed5979
 const size_t hw_compat_rhel_9_1_len = G_N_ELEMENTS(hw_compat_rhel_9_1);
ed5979
 
ed5979
-- 
ed5979
2.31.1
ed5979