render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
404507
From a845df6a28ecc3479ad40e49d711e0c86cd27f85 Mon Sep 17 00:00:00 2001
404507
Message-Id: <a845df6a28ecc3479ad40e49d711e0c86cd27f85@dist-git>
404507
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
404507
Date: Thu, 30 Nov 2017 17:45:59 +0100
404507
Subject: [PATCH] virQEMUCapsHasPCIMultiBus: use def->os.arch
404507
MIME-Version: 1.0
404507
Content-Type: text/plain; charset=UTF-8
404507
Content-Transfer-Encoding: 8bit
404507
404507
We do not fill out qemuCaps->arch when parsing status XML.
404507
404507
Use def->os.arch like we do for PPC.
404507
404507
This fixes hotplug after daemon restart for domains that use
404507
a user alias for the implicit pci-root on x86.
404507
404507
https://bugzilla.redhat.com/show_bug.cgi?id=1518148
404507
(cherry picked from commit fdf354fb51e7f00b582d0daa18961d432155df83)
404507
Signed-off-by: Ján Tomko <jtomko@redhat.com>
404507
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
404507
---
404507
 src/qemu/qemu_capabilities.c                                        | 2 +-
404507
 tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml         | 2 +-
404507
 tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml   | 2 +-
404507
 tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml           | 2 +-
404507
 tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml | 2 +-
404507
 tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml              | 2 +-
404507
 6 files changed, 6 insertions(+), 6 deletions(-)
404507
404507
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
404507
index d1677144b7..81f7e4e440 100644
404507
--- a/src/qemu/qemu_capabilities.c
404507
+++ b/src/qemu/qemu_capabilities.c
404507
@@ -2415,7 +2415,7 @@ bool virQEMUCapsHasPCIMultiBus(virQEMUCapsPtr qemuCaps,
404507
 {
404507
     /* x86_64 and i686 support PCI-multibus on all machine types
404507
      * since forever */
404507
-    if (ARCH_IS_X86(qemuCaps->arch))
404507
+    if (ARCH_IS_X86(def->os.arch))
404507
         return true;
404507
 
404507
     if (def->os.arch == VIR_ARCH_PPC ||
404507
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
404507
index 662ed67390..43e6267250 100644
404507
--- a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
404507
+++ b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
404507
@@ -56,7 +56,7 @@
404507
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
404507
     </controller>
404507
     <controller type='pci' index='0' model='pci-root'>
404507
-      <alias name='pci'/>
404507
+      <alias name='pci.0'/>
404507
     </controller>
404507
     <input type='mouse' bus='ps2'>
404507
       <alias name='input0'/>
404507
diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
404507
index 866a81a2d7..0a8d372149 100644
404507
--- a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
404507
+++ b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
404507
@@ -56,7 +56,7 @@
404507
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
404507
     </controller>
404507
     <controller type='pci' index='0' model='pci-root'>
404507
-      <alias name='pci'/>
404507
+      <alias name='pci.0'/>
404507
     </controller>
404507
     <input type='mouse' bus='ps2'>
404507
       <alias name='input0'/>
404507
diff --git a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
404507
index a025033e84..fe9a81a091 100644
404507
--- a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
404507
+++ b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
404507
@@ -32,7 +32,7 @@
404507
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
404507
     </controller>
404507
     <controller type='pci' index='0' model='pci-root'>
404507
-      <alias name='pci'/>
404507
+      <alias name='pci.0'/>
404507
     </controller>
404507
     <input type='mouse' bus='ps2'>
404507
       <alias name='input0'/>
404507
diff --git a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
404507
index 8adcb71041..12b28be5fe 100644
404507
--- a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
404507
+++ b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
404507
@@ -32,7 +32,7 @@
404507
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
404507
     </controller>
404507
     <controller type='pci' index='0' model='pci-root'>
404507
-      <alias name='pci'/>
404507
+      <alias name='pci.0'/>
404507
     </controller>
404507
     <input type='mouse' bus='ps2'>
404507
       <alias name='input0'/>
404507
diff --git a/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml b/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml
404507
index b52f049fb0..6f50bb5c12 100644
404507
--- a/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml
404507
+++ b/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml
404507
@@ -22,7 +22,7 @@
404507
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
404507
     </controller>
404507
     <controller type='pci' index='0' model='pci-root'>
404507
-      <alias name='pci'/>
404507
+      <alias name='pci.0'/>
404507
     </controller>
404507
     <input type='mouse' bus='ps2'>
404507
       <alias name='input0'/>
404507
-- 
404507
2.15.1
404507