[libvirt] [PATCH 3/4] virQEMUCapsHasPCIMultiBus: use def->os.arch

Ján Tomko jtomko at redhat.com
Wed Nov 29 14:58:56 UTC 2017


We do not fill out qemuCaps->arch when parsing status XML.

Use def->os.arch like we do for PPC.

This fixes hotplug after daemon restart for domains that use
a user alias for the implicit pci-root on x86.

https://bugzilla.redhat.com/show_bug.cgi?id=1518148
---
 src/qemu/qemu_capabilities.c                                        | 2 +-
 tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml         | 2 +-
 tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml   | 2 +-
 tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml           | 2 +-
 tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml | 2 +-
 tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml              | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index b5cfa70c5..c9d0a66d8 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -2416,7 +2416,7 @@ bool virQEMUCapsHasPCIMultiBus(virQEMUCapsPtr qemuCaps,
 {
     /* x86_64 and i686 support PCI-multibus on all machine types
      * since forever */
-    if (ARCH_IS_X86(qemuCaps->arch))
+    if (ARCH_IS_X86(def->os.arch))
         return true;
 
     if (def->os.arch == VIR_ARCH_PPC ||
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
index 662ed6739..43e626725 100644
--- a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
+++ b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
@@ -56,7 +56,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'>
-      <alias name='pci'/>
+      <alias name='pci.0'/>
     </controller>
     <input type='mouse' bus='ps2'>
       <alias name='input0'/>
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
index 866a81a2d..0a8d37214 100644
--- a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
+++ b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
@@ -56,7 +56,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'>
-      <alias name='pci'/>
+      <alias name='pci.0'/>
     </controller>
     <input type='mouse' bus='ps2'>
       <alias name='input0'/>
diff --git a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
index a025033e8..fe9a81a09 100644
--- a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
+++ b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
@@ -32,7 +32,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'>
-      <alias name='pci'/>
+      <alias name='pci.0'/>
     </controller>
     <input type='mouse' bus='ps2'>
       <alias name='input0'/>
diff --git a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
index 8adcb7104..12b28be5f 100644
--- a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
+++ b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
@@ -32,7 +32,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'>
-      <alias name='pci'/>
+      <alias name='pci.0'/>
     </controller>
     <input type='mouse' bus='ps2'>
       <alias name='input0'/>
diff --git a/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml b/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml
index b52f049fb..6f50bb5c1 100644
--- a/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml
+++ b/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml
@@ -22,7 +22,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'>
-      <alias name='pci'/>
+      <alias name='pci.0'/>
     </controller>
     <input type='mouse' bus='ps2'>
       <alias name='input0'/>
-- 
2.13.6




More information about the libvir-list mailing list