]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuhotplugtest: Add also always-present capabilities
authorPeter Krempa <pkrempa@redhat.com>
Fri, 9 Apr 2021 13:59:42 +0000 (15:59 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 3 May 2021 10:14:44 +0000 (12:14 +0200)
Use virQEMUCapsInitQMPBasicArch in qemuHotplugCreateObjects so that we
also add the always-present capabilities to the set of capabilities used
for the hotplug test and fix fallout.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
24 files changed:
tests/qemuhotplugtest.c
tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml
tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml
tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml
tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml
tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml
tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml
tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml
tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml
tests/qemuhotplugtestcpus/x86-old-bulk-result-conf.xml
tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml
tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-doorbell-detach.xml
tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-plain-detach.xml
tests/qemuhotplugtestdevices/qemuhotplug-watchdog-full.xml
tests/qemuhotplugtestdevices/qemuhotplug-watchdog-user-alias-full.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+hostdev-pci.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+interface-vdpa.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml
tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml

index cb29d62aff14052a58f897ffa36ee572b5a38ba8..57d76845c6ad309249bdd1fe0fed2577ec692894 100644 (file)
@@ -32,6 +32,9 @@
 #include "virthread.h"
 #include "virfile.h"
 
+#define LIBVIRT_QEMU_CAPSPRIV_H_ALLOW
+#include "qemu/qemu_capspriv.h"
+
 #define VIR_FROM_THIS VIR_FROM_NONE
 
 static virQEMUDriver driver;
@@ -71,6 +74,8 @@ qemuHotplugCreateObjects(virDomainXMLOption *xmlopt,
     if (!(priv->qemuCaps = virQEMUCapsNew()))
         return -1;
 
+    virQEMUCapsInitQMPBasicArch(priv->qemuCaps);
+
     virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VIRTIO_SCSI);
     virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_STORAGE);
     virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_CCW);
index 690c85cf85ca4b2c8d99aaab8476b9a1b79a7076..a7ada18bf3e22c07c3ca5e8f77339ac6e571aac2 100644 (file)
@@ -59,7 +59,7 @@
     <input type='keyboard' bus='ps2'/>
     <audio id='1' type='none'/>
     <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
index 58e156203f09bee581e3faa8279995a173b18f6b..3932fd9b55ce74711164769f98321be6465ec283 100644 (file)
@@ -67,7 +67,7 @@
     <audio id='1' type='none'/>
     <memballoon model='virtio'>
       <alias name='balloon0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
index d1e6329812e9d8d76e17c00e9e6381eb8819f75e..f3a1efeede1e755525c03c610e7fae1ff7bac002 100644 (file)
@@ -59,7 +59,7 @@
     <input type='keyboard' bus='ps2'/>
     <audio id='1' type='none'/>
     <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
index a119ae44d53f5d12f930f6a90b7add5d2a1c6d04..6d64ead3d0aab2748102689b71bfd98b5d8d09b0 100644 (file)
@@ -67,7 +67,7 @@
     <audio id='1' type='none'/>
     <memballoon model='virtio'>
       <alias name='balloon0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
index a0358df432bafd6d16db84441418b4ef9cb5784b..87eb19ebd8c749af5d270a6379e9f19e899fe467 100644 (file)
@@ -35,7 +35,7 @@
     <input type='keyboard' bus='ps2'/>
     <audio id='1' type='none'/>
     <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
index a6c6c33a4bbf526e1cbf9c0bec0b7b39e4054b0a..251634e26642b6f6e028c5b892a95feec6852824 100644 (file)
@@ -43,7 +43,7 @@
     <audio id='1' type='none'/>
     <memballoon model='virtio'>
       <alias name='balloon0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
index d16832b116bb08d837bcb8c249acea56e4e0cfe1..140892aaf8f29ad565744bab3b86a920a448faff 100644 (file)
@@ -35,7 +35,7 @@
     <input type='keyboard' bus='ps2'/>
     <audio id='1' type='none'/>
     <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
index 5edb601297ebecf6fb2c6cc9f267f536fe8f1873..45196ba1d1e59d4c90949de1ef0f91afc5a69f5a 100644 (file)
@@ -43,7 +43,7 @@
     <audio id='1' type='none'/>
     <memballoon model='virtio'>
       <alias name='balloon0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
index 0c675c3db955fbba210956f78861044cf45ac37d..a3ca61ce7603b3fa843c0229a4bffd166dcb85d9 100644 (file)
@@ -25,7 +25,7 @@
     <input type='keyboard' bus='ps2'/>
     <audio id='1' type='none'/>
     <memballoon model='virtio'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
index 5aca6ea5c51d4b680116c4b3fbe1194644fda05b..96dd8b5873b828efc206243945e4c60f6e4b5b76 100644 (file)
@@ -33,7 +33,7 @@
     <audio id='1' type='none'/>
     <memballoon model='virtio'>
       <alias name='balloon0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </memballoon>
   </devices>
 </domain>
index 7c066964d7459030e1877feb83215d6979097403..02cd0dd07d2ea14193f253adf6fac338faae2a89 100644 (file)
@@ -3,5 +3,5 @@
   <server path='/var/lib/libvirt/shmem-shmem1-sock'/>
   <msi ioeventfd='on'/>
   <alias name='shmem1'/>
-  <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
 </shmem>
index 338017aa2854d2435154873af5bf1a27def02265..10025bdefcee9f33394fe588959d7e43fc602d19 100644 (file)
@@ -2,5 +2,5 @@
   <model type='ivshmem-plain'/>
   <size unit='M'>4</size>
   <alias name='shmem0'/>
-  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+  <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
 </shmem>
index 68bbfa87c76814f3958923456ccd786de7f0d599..ca9425e640d5e9b2ba630e39fd47a8890384dd17 100644 (file)
@@ -1,4 +1,4 @@
 <watchdog model='i6300esb' action='poweroff'>
   <alias name='watchdog0'/>
-  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+  <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
 </watchdog>
index d34f24554641a23cf13f7e693fc88cc531adf1e9..e2ec85637b699acc986f4bef084d3cd297c28149 100644 (file)
@@ -1,4 +1,4 @@
 <watchdog model='i6300esb' action='poweroff'>
   <alias name='ua-UserWatchdog'/>
-  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+  <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
 </watchdog>
index 5b573f1915723285dd497e9cf4e6179dee727528..af68d7fc6e94183228e23d880d4e2d9bcb3c0966 100644 (file)
@@ -27,7 +27,7 @@
       <readonly/>
       <shareable/>
       <alias name='virtio-disk4'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </disk>
     <controller type='usb' index='0'>
       <alias name='usb'/>
index 62366bee05bbc7c29a0239148ddfbea79de52066..d8b0c80febb2e845b8679bb03b262da58da1b831 100644 (file)
@@ -51,7 +51,7 @@
         <address domain='0x0000' bus='0x06' slot='0x12' function='0x2'/>
       </source>
       <alias name='hostdev0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </hostdev>
     <memballoon model='none'/>
   </devices>
index 54e5dabdfa150581e60e25a4a5c710d8412673b8..f80dc42ac51c33034f8927f47dafac48105ec944 100644 (file)
@@ -43,7 +43,7 @@
       <source dev='/dev/vhost-vdpa-0'/>
       <model type='virtio'/>
       <alias name='net0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </interface>
     <input type='mouse' bus='ps2'>
       <alias name='input0'/>
index 86b6ebe19a6dcae3fc5f856caf4d4499e03a2953..b0898a968bbcb621faddfe83b364005979ed992b 100644 (file)
       <model type='ivshmem-plain'/>
       <size unit='M'>4</size>
       <alias name='shmem0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </shmem>
     <shmem name='shmem1'>
       <model type='ivshmem-doorbell'/>
       <server path='/var/lib/libvirt/shmem-shmem1-sock'/>
       <msi ioeventfd='on'/>
       <alias name='shmem1'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </shmem>
   </devices>
   <seclabel type='none' model='none'/>
index 3a208a8244a8e55d2e4b7d65770f6e26369a54f5..db21d2b5ba6816081b8621f78a61b7d4affd5d82 100644 (file)
@@ -50,7 +50,7 @@
       <model type='ivshmem-plain'/>
       <size unit='M'>4</size>
       <alias name='shmem0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </shmem>
   </devices>
   <seclabel type='none' model='none'/>
index 31bafb0814cc3c9ad47b2c40cd5dac37ca8fd3bd..f54c7a4599c25a78f6201bd5701b373c99108a84 100644 (file)
@@ -47,7 +47,7 @@
     <audio id='1' type='none'/>
     <watchdog model='i6300esb' action='poweroff'>
       <alias name='ua-UserWatchdog'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </watchdog>
     <memballoon model='none'/>
   </devices>
index c9a2e90433e95d5fbd38ee5c477ad7bfce1aab46..bd85c56ce69938ceee105e5217d511f3983421c6 100644 (file)
@@ -47,7 +47,7 @@
     <audio id='1' type='none'/>
     <watchdog model='i6300esb' action='poweroff'>
       <alias name='watchdog0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </watchdog>
     <memballoon model='none'/>
   </devices>
index 0a04e2ac04122e9417498a4f74db85ac01082827..a61a68f561ed6bc6b7074d342ced6e6c263452c3 100644 (file)
     </controller>
     <controller type='scsi' index='0' model='virtio-scsi'>
       <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </controller>
     <controller type='scsi' index='1' model='virtio-scsi'>
       <alias name='scsi1'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </controller>
     <controller type='scsi' index='2' model='virtio-scsi'>
       <alias name='scsi2'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </controller>
     <controller type='scsi' index='3' model='virtio-scsi'>
       <alias name='scsi3'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </controller>
     <input type='mouse' bus='ps2'>
       <alias name='input0'/>
index f553229a31ab3fd80186dc53d884bd4a3bcca367..ddc57cbb16e4817373b67afdcaf953ca29e28887 100644 (file)
     </controller>
     <controller type='scsi' index='0' model='virtio-scsi'>
       <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </controller>
     <controller type='scsi' index='1' model='virtio-scsi'>
       <alias name='scsi1'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </controller>
     <controller type='scsi' index='2' model='virtio-scsi'>
       <alias name='scsi2'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </controller>
     <controller type='scsi' index='3' model='virtio-scsi'>
       <alias name='scsi3'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
     </controller>
     <input type='mouse' bus='ps2'>
       <alias name='input0'/>