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

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