render / rpms / libvirt

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