qemuhotplugtest: Add also always-present capabilities

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>
This commit is contained in:
Peter Krempa 2021-04-09 15:59:42 +02:00
parent 64ee4b2e45
commit 7d3ca9dbdd
24 changed files with 35 additions and 30 deletions

View 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);

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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'/>

View 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>

View 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'/>

View File

@ -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'/>

View 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'/>

View 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>

View 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>

View File

@ -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'/>

View File

@ -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'/>