]> xenbits.xensource.com Git - libvirt.git/commitdiff
virQEMUCapsHasPCIMultiBus: use def->os.arch
authorJán Tomko <jtomko@redhat.com>
Wed, 29 Nov 2017 13:51:22 +0000 (14:51 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 30 Nov 2017 15:49:05 +0000 (16:49 +0100)
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
tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml

index 86c1da202102acf388d6a498d13036f7eae2f8cd..3da3a0cad5f3c7ca2a9a46ce5ab502ab38faec8b 100644 (file)
@@ -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 ||
index 662ed673901410ce63db0d751a3760dacce7f0a1..43e62672501bd7b99c9073e4ac25d8d6679faf70 100644 (file)
@@ -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'/>
index 866a81a2d757a8ef5bb425167c35d1e7511c521a..0a8d37214981774d49aeb6c6a5a3b9de8e0815c2 100644 (file)
@@ -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'/>
index a025033e846c22accc0d45a6e9519d01337a9394..fe9a81a0916ba045925eaca38e8d3387bf04e0d5 100644 (file)
@@ -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'/>
index 8adcb7104120983abfefe8e597be88a8461b2b20..12b28be5fe733192a3835466c36ce5fd5ae0a26b 100644 (file)
@@ -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'/>
index b52f049fb0f04d6575988c3fb3ce64e477d9ea89..6f50bb5c12e910fdbeb79266e56238bc61cb9a4d 100644 (file)
@@ -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'/>