Skip to contentSkip to conversation

virtio-rng-pci: fix migration compat for vectors

PATCH In review Dr. David Alan Gilbert (git) 4 participants 4 messages Jan 9, 2023 – Jan 12, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio-rng-pci: fix migration compat for vectors

From: "Dr. David Alan Gilbert" <[email protected]>

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")
---
 hw/core/machine.c | 1 +
 1 file changed, 1 insertion(+)
hw/core/machine.c +1 -0
index f589b92909..45459d1cef 100644
@@ -45,6 +45,7 @@ const size_t hw_compat_7_2_len = G_N_ELEMENTS(hw_compat_7_2);
 
 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);
 
Signature · 1 line
2.39.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 28 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

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")
---
  hw/core/machine.c | 1 +
  1 file changed, 1 insertion(+)
hw/core/machine.c +0 -0
index f589b92909..45459d1cef 100644

hw/core/machine.c const size_t hw_compat_7_2_len = G_N_ELEMENTS(hw_compat_7_2); · line 51

Quoted 7 lines
hw/core/machine.c +1 -0
@@ -45,6 +45,7 @@ const size_t hw_compat_7_2_len = G_N_ELEMENTS(hw_compat_7_2);
 
  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);
 
Acked-by on v1 1/1
#2 lore raw
In reply to Dr. David Alan Gilbert (git)

Seems good to me.

Quoted 43 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

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")

---
 hw/core/machine.c | 1 +
 1 file changed, 1 insertion(+)
hw/core/machine.c +1 -1
index f589b92909..45459d1cef 100644
@@ -45,6 +45,7 @@ const size_t hw_compat_7_2_len =
 G_N_ELEMENTS(hw_compat_7_2);
 
 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);
 
--

2.39.0

Reviewed-by on v1 1/1
#3 lore raw
In reply to Dr. David Alan Gilbert (git)
Quoted 13 lines · Dr. David Alan Gilbert (git)

From: "Dr. David Alan Gilbert" <[email protected]>

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

Quoted 4 lines

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")

Thanks!

Quoted 17 lines
---
  hw/core/machine.c | 1 +
  1 file changed, 1 insertion(+)
hw/core/machine.c +1 -0
index f589b92909..45459d1cef 100644
@@ -45,6 +45,7 @@ const size_t hw_compat_7_2_len = G_N_ELEMENTS(hw_compat_7_2);
 
  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);