Skip to contentSkip to conversation

virtio-rng-pci: fix transitional migration compat for vectors

PATCH In review Dr. David Alan Gilbert (git) 4 participants 6 messages Feb 7, 2023

lore
Share & tools
lore
#0 lore raw

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

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

In bad9c5a5166fd5e3a892b7b0477cf2f4bd3a959a I fixed the virito-rng-pci migration compatibility, but it was discovered that we also need to fix the other aliases of the device for the transitional cases.

Fixes 9ea02e8f1 ('virtio-rng-pci: Allow setting nvectors, so we can use MSI-X')

bz: https://bugzilla.redhat.com/show_bug.cgi?id=2162569

---
 hw/core/machine.c | 2 ++
 1 file changed, 2 insertions(+)
hw/core/machine.c +2 -0
index b5cd42cd8c..4627b274d9 100644
@@ -49,6 +49,8 @@ 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" },
+    { "virtio-rng-pci-transitional", "vectors", "0" },
+    { "virtio-rng-pci-non-transitional", "vectors", "0" },
 };
 const size_t hw_compat_7_1_len = G_N_ELEMENTS(hw_compat_7_1);
 
Signature · 1 line
2.39.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Dr. David Alan Gilbert (git)

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

In bad9c5a5166fd5e3a892b7b0477cf2f4bd3a959a I fixed the virito-rng-pci

Typo "virtio-rng-pci".

Quoted 15 lines

migration compatibility, but it was discovered that we also need to fix the other aliases of the device for the transitional cases.

Fixes 9ea02e8f1 ('virtio-rng-pci: Allow setting nvectors, so we can use MSI-X')

bz: https://bugzilla.redhat.com/show_bug.cgi?id=2162569

---
  hw/core/machine.c | 2 ++
  1 file changed, 2 insertions(+)
hw/core/machine.c +0 -0
index b5cd42cd8c..4627b274d9 100644

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

Quoted 5 lines
hw/core/machine.c +2 -0
@@ -49,6 +49,8 @@ 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" },
+    { "virtio-rng-pci-transitional", "vectors", "0" },
+    { "virtio-rng-pci-non-transitional", "vectors", "0" },

Ouch :(

Quoted 3 lines
hw/core/machine.c +0 -0
  };
  const size_t hw_compat_7_1_len = G_N_ELEMENTS(hw_compat_7_1);
 
#2 lore raw
Quoted 6 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Quoted 3 lines · Dr. David Alan Gilbert (git)

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

In bad9c5a5166fd5e3a892b7b0477cf2f4bd3a959a I fixed the virito-rng-pci

Typo "virtio-rng-pci".

I've made that typo SO many times...

Quoted 23 lines
Quoted 15 lines

migration compatibility, but it was discovered that we also need to fix the other aliases of the device for the transitional cases.

Fixes 9ea02e8f1 ('virtio-rng-pci: Allow setting nvectors, so we can use MSI-X')

bz: https://bugzilla.redhat.com/show_bug.cgi?id=2162569

---
  hw/core/machine.c | 2 ++
  1 file changed, 2 insertions(+)
hw/core/machine.c +0 -0
index b5cd42cd8c..4627b274d9 100644

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

Quoted 5 lines
hw/core/machine.c +2 -0
@@ -49,6 +49,8 @@ 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" },
+    { "virtio-rng-pci-transitional", "vectors", "0" },
+    { "virtio-rng-pci-non-transitional", "vectors", "0" },

Ouch :(

Quoted 1 line

Thanks!

Dave

Quoted 4 lines
Quoted 3 lines
hw/core/machine.c +0 -0
  };
  const size_t hw_compat_7_1_len = G_N_ELEMENTS(hw_compat_7_1);
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Reviewed-by on v1 1/1
#4 lore raw
In reply to Dr. David Alan Gilbert (git)
Quoted 18 lines · Dr. David Alan Gilbert (git)

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

In bad9c5a5166fd5e3a892b7b0477cf2f4bd3a959a I fixed the virito-rng-pci migration compatibility, but it was discovered that we also need to fix the other aliases of the device for the transitional cases.

Fixes 9ea02e8f1 ('virtio-rng-pci: Allow setting nvectors, so we can use MSI-X')

bz: https://bugzilla.redhat.com/show_bug.cgi?id=2162569

---
  hw/core/machine.c | 2 ++
  1 file changed, 2 insertions(+)
hw/core/machine.c +0 -0
index b5cd42cd8c..4627b274d9 100644

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

Quoted 8 lines
hw/core/machine.c +2 -0
@@ -49,6 +49,8 @@ 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" },
+    { "virtio-rng-pci-transitional", "vectors", "0" },
+    { "virtio-rng-pci-non-transitional", "vectors", "0" },
  };
  const size_t hw_compat_7_1_len = G_N_ELEMENTS(hw_compat_7_1);
 
#5 lore raw
In reply to Dr. David Alan Gilbert (git)
Quoted 3 lines · Dr. David Alan Gilbert (git)

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

In bad9c5a5166fd5e3a892b7b0477cf2f4bd3a959a I fixed the virito-rng-pci

virtio?

Quoted 25 lines

migration compatibility, but it was discovered that we also need to fix the other aliases of the device for the transitional cases.

Fixes 9ea02e8f1 ('virtio-rng-pci: Allow setting nvectors, so we can use MSI-X')

bz: https://bugzilla.redhat.com/show_bug.cgi?id=2162569

---
 hw/core/machine.c | 2 ++
 1 file changed, 2 insertions(+)
hw/core/machine.c +2 -0
index b5cd42cd8c..4627b274d9 100644
@@ -49,6 +49,8 @@ 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" },
+    { "virtio-rng-pci-transitional", "vectors", "0" },
+    { "virtio-rng-pci-non-transitional", "vectors", "0" },
 };
 const size_t hw_compat_7_1_len = G_N_ELEMENTS(hw_compat_7_1);
 
Signature · 1 line
2.39.1
#3 lore raw
In reply to Dr. David Alan Gilbert
Quoted 9 lines · Dr. David Alan Gilbert
Quoted 6 lines · * Philippe Mathieu-Daudé ([email protected]) wrote:
Quoted 3 lines · Dr. David Alan Gilbert (git)

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

In bad9c5a5166fd5e3a892b7b0477cf2f4bd3a959a I fixed the virito-rng-pci

Typo "virtio-rng-pci".

I've made that typo SO many times...

Add this in .vimrc

ab virito virtio

and never make this mistake again ... as long as you use vim ;)

Quoted 35 lines
Quoted 23 lines
Quoted 15 lines

migration compatibility, but it was discovered that we also need to fix the other aliases of the device for the transitional cases.

Fixes 9ea02e8f1 ('virtio-rng-pci: Allow setting nvectors, so we can use MSI-X')

bz: https://bugzilla.redhat.com/show_bug.cgi?id=2162569

---
  hw/core/machine.c | 2 ++
  1 file changed, 2 insertions(+)
hw/core/machine.c +0 -0
index b5cd42cd8c..4627b274d9 100644

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

Quoted 5 lines
hw/core/machine.c +2 -0
@@ -49,6 +49,8 @@ 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" },
+    { "virtio-rng-pci-transitional", "vectors", "0" },
+    { "virtio-rng-pci-non-transitional", "vectors", "0" },

Ouch :(

Quoted 1 line

Thanks!

Dave

Quoted 4 lines
Quoted 3 lines
hw/core/machine.c +0 -0
  };
  const size_t hw_compat_7_1_len = G_N_ELEMENTS(hw_compat_7_1);
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK