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@xxxxxxxxxx> Reviewed-by: Pavel Hrdina <phrdina@xxxxxxxxxx> Reviewed-by: Neal Gompa <ngompa13@xxxxxxxxx> --- tests/qemuhotplugtest.c | 5 +++++ .../qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml | 2 +- .../qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml | 2 +- .../ppc64-modern-individual-result-conf.xml | 2 +- .../ppc64-modern-individual-result-live.xml | 2 +- tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml | 2 +- tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml | 2 +- .../x86-modern-individual-add-result-conf.xml | 2 +- .../x86-modern-individual-add-result-live.xml | 2 +- tests/qemuhotplugtestcpus/x86-old-bulk-result-conf.xml | 2 +- tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml | 2 +- .../qemuhotplug-ivshmem-doorbell-detach.xml | 2 +- .../qemuhotplug-ivshmem-plain-detach.xml | 2 +- .../qemuhotplugtestdevices/qemuhotplug-watchdog-full.xml | 2 +- .../qemuhotplug-watchdog-user-alias-full.xml | 2 +- .../qemuhotplug-base-live+disk-virtio.xml | 2 +- .../qemuhotplug-base-live+hostdev-pci.xml | 2 +- .../qemuhotplug-base-live+interface-vdpa.xml | 2 +- .../qemuhotplug-base-live+ivshmem-doorbell.xml | 4 ++-- .../qemuhotplug-base-live+ivshmem-plain.xml | 2 +- .../qemuhotplug-base-live+watchdog-user-alias.xml | 2 +- .../qemuhotplug-base-live+watchdog.xml | 2 +- .../qemuhotplug-base-with-scsi-controller-live.xml | 8 ++++---- ...plug-base-without-scsi-controller-live+disk-scsi-2.xml | 8 ++++---- 24 files changed, 35 insertions(+), 30 deletions(-) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index cb29d62aff..57d76845c6 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -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); diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml index 690c85cf85..a7ada18bf3 100644 --- a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml +++ b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-conf.xml @@ -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> diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml index 58e156203f..3932fd9b55 100644 --- a/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml +++ b/tests/qemuhotplugtestcpus/ppc64-modern-bulk-result-live.xml @@ -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> diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml index d1e6329812..f3a1efeede 100644 --- a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml +++ b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-conf.xml @@ -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> diff --git a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml index a119ae44d5..6d64ead3d0 100644 --- a/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml +++ b/tests/qemuhotplugtestcpus/ppc64-modern-individual-result-live.xml @@ -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> diff --git a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml index a0358df432..87eb19ebd8 100644 --- a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml +++ b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-conf.xml @@ -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> diff --git a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml index a6c6c33a4b..251634e266 100644 --- a/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml +++ b/tests/qemuhotplugtestcpus/x86-modern-bulk-result-live.xml @@ -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> diff --git a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml index d16832b116..140892aaf8 100644 --- a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml +++ b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-conf.xml @@ -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> diff --git a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml index 5edb601297..45196ba1d1 100644 --- a/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml +++ b/tests/qemuhotplugtestcpus/x86-modern-individual-add-result-live.xml @@ -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> diff --git a/tests/qemuhotplugtestcpus/x86-old-bulk-result-conf.xml b/tests/qemuhotplugtestcpus/x86-old-bulk-result-conf.xml index 0c675c3db9..a3ca61ce76 100644 --- a/tests/qemuhotplugtestcpus/x86-old-bulk-result-conf.xml +++ b/tests/qemuhotplugtestcpus/x86-old-bulk-result-conf.xml @@ -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> diff --git a/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml b/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml index 5aca6ea5c5..96dd8b5873 100644 --- a/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml +++ b/tests/qemuhotplugtestcpus/x86-old-bulk-result-live.xml @@ -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> diff --git a/tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-doorbell-detach.xml b/tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-doorbell-detach.xml index 7c066964d7..02cd0dd07d 100644 --- a/tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-doorbell-detach.xml +++ b/tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-doorbell-detach.xml @@ -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> diff --git a/tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-plain-detach.xml b/tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-plain-detach.xml index 338017aa28..10025bdefc 100644 --- a/tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-plain-detach.xml +++ b/tests/qemuhotplugtestdevices/qemuhotplug-ivshmem-plain-detach.xml @@ -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> diff --git a/tests/qemuhotplugtestdevices/qemuhotplug-watchdog-full.xml b/tests/qemuhotplugtestdevices/qemuhotplug-watchdog-full.xml index 68bbfa87c7..ca9425e640 100644 --- a/tests/qemuhotplugtestdevices/qemuhotplug-watchdog-full.xml +++ b/tests/qemuhotplugtestdevices/qemuhotplug-watchdog-full.xml @@ -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> diff --git a/tests/qemuhotplugtestdevices/qemuhotplug-watchdog-user-alias-full.xml b/tests/qemuhotplugtestdevices/qemuhotplug-watchdog-user-alias-full.xml index d34f245546..e2ec85637b 100644 --- a/tests/qemuhotplugtestdevices/qemuhotplug-watchdog-user-alias-full.xml +++ b/tests/qemuhotplugtestdevices/qemuhotplug-watchdog-user-alias-full.xml @@ -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> diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml index 5b573f1915..af68d7fc6e 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-virtio.xml @@ -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'/> diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+hostdev-pci.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+hostdev-pci.xml index 62366bee05..d8b0c80feb 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+hostdev-pci.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+hostdev-pci.xml @@ -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> diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+interface-vdpa.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+interface-vdpa.xml index 54e5dabdfa..f80dc42ac5 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+interface-vdpa.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+interface-vdpa.xml @@ -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'/> diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml index 86b6ebe19a..b0898a968b 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-doorbell.xml @@ -50,14 +50,14 @@ <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'/> diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml index 3a208a8244..db21d2b5ba 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+ivshmem-plain.xml @@ -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'/> diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml index 31bafb0814..f54c7a4599 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog-user-alias.xml @@ -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> diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml index c9a2e90433..bd85c56ce6 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+watchdog.xml @@ -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> diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml index 0a04e2ac04..a61a68f561 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live.xml @@ -28,19 +28,19 @@ </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'/> diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml index f553229a31..ddc57cbb16 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml @@ -38,19 +38,19 @@ </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'/> -- 2.30.2