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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux