From nobody Thu Nov 28 16:31:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1521099130558963.9548303796805; Thu, 15 Mar 2018 00:32:10 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F241BC01F290; Thu, 15 Mar 2018 07:32:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD4DF5D728; Thu, 15 Mar 2018 07:32:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6C14B4CAA4; Thu, 15 Mar 2018 07:32:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2EHJwtL024685 for ; Wed, 14 Mar 2018 13:20:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id B2598620CA; Wed, 14 Mar 2018 17:19:58 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AADC36046B for ; Wed, 14 Mar 2018 17:19:55 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2A3D0804E4 for ; Wed, 14 Mar 2018 17:19:53 +0000 (UTC) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2EHEBi2032678 for ; Wed, 14 Mar 2018 13:19:52 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gq7172s3s-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 14 Mar 2018 13:19:52 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Mar 2018 17:19:50 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 14 Mar 2018 17:19:49 -0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2EHJm8Y61931584 for ; Wed, 14 Mar 2018 17:19:48 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1251142049 for ; Wed, 14 Mar 2018 17:12:03 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 468AF42041 for ; Wed, 14 Mar 2018 17:12:02 +0000 (GMT) Received: from localhost.localdomain (unknown [9.79.182.166]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP for ; Wed, 14 Mar 2018 17:12:01 +0000 (GMT) From: Shivaprasad G Bhat To: libvir-list@redhat.com Date: Wed, 14 Mar 2018 22:49:46 +0530 In-Reply-To: <152104711186.10112.1077788328340024644.stgit@localhost.localdomain> References: <152104711186.10112.1077788328340024644.stgit@localhost.localdomain> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18031417-0008-0000-0000-000004DD793B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031417-0009-0000-0000-00001E707EF8 Message-Id: <152104798353.10112.420755108578841493.stgit@localhost.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-14_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803140192 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 14 Mar 2018 17:19:53 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 14 Mar 2018 17:19:53 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'sbhat@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.7 (RCVD_IN_DNSWL_LOW) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [RFC PATCH 12/28] qemu: address: Enable auto addressing multifunction cards X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 15 Mar 2018 07:32:09 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" For existing domains using the primary function alone of a multifunction ca= rd, the card is still treated as a multifunction card. This is done to prevent hotplug of other functions when the primary function is already hotplugged. If the secondary functions are part of the xml without the primary function being part of the xml, this has never been supported. So, the libvirt doesn= 't consider this either as a multifunction card. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_domain.h | 11 + src/qemu/qemu_domain_address.c | 169 ++++++++++++++++= +++- tests/qemuhotplugtest.c | 1=20 .../hostdev-pci-multifunction.args | 18 +- tests/qemuxml2argvdata/pseries-hostdevs-1.args | 5 - tests/qemuxml2argvdata/pseries-hostdevs-3.args | 5 - tests/qemuxml2argvtest.c | 5 - .../hostdev-pci-multifunction.xml | 16 +- tests/qemuxml2xmloutdata/pseries-hostdevs-1.xml | 4=20 tests/qemuxml2xmloutdata/pseries-hostdevs-3.xml | 4=20 10 files changed, 207 insertions(+), 31 deletions(-) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 6d3e6eb5e3..fbfc994652 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -473,6 +473,17 @@ struct _qemuDomainSaveCookie { =20 qemuDomainSaveCookiePtr qemuDomainSaveCookieNew(virDomainObjPtr vm); =20 +typedef struct _qemuDomainPCIHostdevdata qemuDomainPCIHostdevdata; +typedef qemuDomainPCIHostdevdata *qemuDomainPCIHostdevDataPtr; +struct _qemuDomainPCIHostdevdata { + const virDomainDef *def; + virDomainPCIAddressSetPtr addrs; + virDomainHostdevDefPtr device; +}; + +typedef int (*virDomainPCIHostdevCallback)(qemuDomainPCIHostdevDataPtr dat= a, + virDomainHostdevDefPtr hostdev); + const char *qemuDomainAsyncJobPhaseToString(qemuDomainAsyncJob job, int phase); int qemuDomainAsyncJobPhaseFromString(qemuDomainAsyncJob job, diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 424b56dac9..bc72b6e94c 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1186,11 +1186,155 @@ qemuDomainSetupIsolationGroups(virDomainDefPtr def) } =20 =20 +#define PCI_MAX_BRIDGE_NUMBER 0xff +#define PCI_MAX_DEVICES 32 + + +/** + * qemuDomainPCIHostDevicesIter: + * @data - The data->device is the one which is called-back with for + * each hostdev + * cb() - callback to be called for each hostdev + * Return : + * If the callback for any of the hostdev fails, the Iter returns + * with the return value for that callback. + * Zero on success. + */ +static +int qemuDomainPCIHostDevicesIter(qemuDomainPCIHostdevDataPtr data, + virDomainPCIHostdevCallback cb) +{ + size_t i; + int ret =3D -1; + + /* Iterate through the PCI Hostdevices, the Mdev source is of type + * UUID, so skip that. */ + for (i =3D 0; i < data->def->nhostdevs; i++) { + virDomainHostdevSubsysPtr subsys =3D &data->def->hostdevs[i]->sour= ce.subsys; + virDomainHostdevDefPtr hostdev =3D data->def->hostdevs[i]; + if (data->device =3D=3D hostdev) + continue; + if (data->def->hostdevs[i]->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBS= YS) + continue; + if (subsys->type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI && + subsys->type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST && + (subsys->type =3D=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV && + subsys->u.mdev.model =3D=3D VIR_MDEV_MODEL_TYPE_VFIO_PCI)) { + continue; + } + + if ((ret =3D cb(data, hostdev)) !=3D 0) + return ret; + } + + return 0; +} + + + +static int +qemuDomainFindNextAggregationSlotIdxIter(virDomainDefPtr def ATTRIBUTE_UNU= SED, + virDomainDeviceDefPtr dev ATTRIBU= TE_UNUSED, + virDomainDeviceInfoPtr info, + void *opaque) +{ + int *aggregationSlotIdx =3D opaque; + + if (info && info->aggregateSlotIdx =3D=3D *aggregationSlotIdx) + return -1; + + return 0; +} + + +static unsigned int +qemuDomainFindNextSlotAggregationIdx(virDomainDefPtr def) +{ + int aggregateSlotIdx =3D 2; + + while (aggregateSlotIdx < PCI_MAX_BRIDGE_NUMBER * PCI_MAX_DEVICES && + virDomainDeviceInfoIterate(def, + qemuDomainFindNextAggregationSlotIdx= Iter, + &aggregateSlotIdx) < 0) { + aggregateSlotIdx++; + } + + return aggregateSlotIdx; +} + + +static int +qemuDomainDefHostdevGetSlotAggregateIdx(qemuDomainPCIHostdevDataPtr data, + virDomainHostdevDefPtr hostdev) +{ + if (data->device && + virHostdevPCIDevicesBelongToSameSlot(data->device, hostdev)) { + if (hostdev->info->aggregateSlotIdx > 0) + return hostdev->info->aggregateSlotIdx; + } + + return 0; +} + +/** + * qemuDomainDefDeviceFindSlotAggregateIdx: + * @def : domain def + * @dev : Find the slot aggregate for the device if other + * functions are already part of the def and have + * a slot aggreate idx assigned. + * Return: + * -1: if not assigned. + * 0: If the device is not a hostdev or not a + * multifunction device. + * >0: If assinged a value; + **/ +int +qemuDomainDefDeviceFindSlotAggregateIdx(virDomainDefPtr def, + virDomainDeviceDefPtr dev) +{ + int aggregateSlotIdx =3D 0; + virPCIDevicePtr pciDev; + virDomainHostdevDefPtr hostdev =3D dev->data.hostdev; + qemuDomainPCIHostdevdata temp =3D {def, NULL, hostdev}; + virPCIDeviceAddressPtr hostAddr =3D &hostdev->source.subsys.u.pci.addr; + + /* Only PCI host devices are subject to isolation */ + if (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS || + hostdev->source.subsys.type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PC= I) { + return 0; + } + + if (!(pciDev =3D virPCIDeviceNew(hostAddr->domain, + hostAddr->bus, + hostAddr->slot, + hostAddr->function))) { + /* libvirt should be able to perform all the + * operations in virPCIDeviceNew() even if it's + * running unprivileged, so if this fails, the device + * apparently doesn't currently exist on the host. + * Since majority of host are non-multifunction, + * assume this one is too. + */ + return 0; + } + + if (!virPCIDeviceIsMultifunction(pciDev)) + return 0; + + aggregateSlotIdx =3D qemuDomainPCIHostDevicesIter(&temp, qemuDomainDef= HostdevGetSlotAggregateIdx); + if (aggregateSlotIdx > 0) + return aggregateSlotIdx; + + return -1; +} + + void -qemuDomainSetDeviceSlotAggregateIdx(virDomainDefPtr def ATTRIBUTE_UNUSED, +qemuDomainSetDeviceSlotAggregateIdx(virDomainDefPtr def, virDomainDeviceDefPtr dev) { virDomainDeviceInfoPtr info =3D virDomainDeviceGetInfo(dev); + int aggregateSlotIdx =3D 0; =20 if (!info) return; @@ -1203,6 +1347,12 @@ qemuDomainSetDeviceSlotAggregateIdx(virDomainDefPtr = def ATTRIBUTE_UNUSED, cont->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT)= { info->aggregateSlotIdx =3D 1; } + } else if (dev->type =3D=3D VIR_DOMAIN_DEVICE_HOSTDEV) { + aggregateSlotIdx =3D qemuDomainDefDeviceFindSlotAggregateIdx(def, = dev); + if (aggregateSlotIdx > 0) + info->aggregateSlotIdx =3D aggregateSlotIdx; + else if (aggregateSlotIdx < 0) + info->aggregateSlotIdx =3D qemuDomainFindNextSlotAggregationId= x(def); } =20 return; @@ -2073,10 +2223,12 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, =20 /* Host PCI devices */ for (i =3D 0; i < def->nhostdevs; i++) { - virDomainHostdevSubsysPtr subsys =3D &def->hostdevs[i]->source.sub= sys; - if (!virDeviceInfoPCIAddressWanted(def->hostdevs[i]->info)) + int function =3D 0; + virDomainHostdevDefPtr hostdev =3D def->hostdevs[i]; + virDomainHostdevSubsysPtr subsys =3D &hostdev->source.subsys; + if (!virDeviceInfoPCIAddressWanted(hostdev->info)) continue; - if (def->hostdevs[i]->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) + if (hostdev->mode !=3D VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) continue; if (subsys->type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI && subsys->type !=3D VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST && @@ -2085,9 +2237,14 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, continue; } =20 - if (qemuDomainPCIAddressReserveNextAddr(addrs, - def->hostdevs[i]->info) < = 0) + if (hostdev->info->aggregateSlotIdx > 1) + function =3D hostdev->source.subsys.u.pci.addr.function; + + if (virDomainPCIAddressReserveNextAddr(addrs, hostdev->info, + hostdev->info->pciConnectFl= ags, + function) < 0) { goto error; + } } =20 /* VirtIO balloon */ diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 31ce8d43b9..b5dca5e5c9 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -81,6 +81,7 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt, virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_DISK_WWN); virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_VFIO_PCI); virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE); + virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY); if (event) virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT); =20 diff --git a/tests/qemuxml2argvdata/hostdev-pci-multifunction.args b/tests/= qemuxml2argvdata/hostdev-pci-multifunction.args index 6b57f5713f..243ca8f2aa 100644 --- a/tests/qemuxml2argvdata/hostdev-pci-multifunction.args +++ b/tests/qemuxml2argvdata/hostdev-pci-multifunction.args @@ -19,11 +19,13 @@ server,nowait \ -no-acpi \ -boot c \ -usb \ --device vfio-pci,host=3D0005:90:01.0,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ --device vfio-pci,host=3D0001:01:00.1,id=3Dhostdev1,bus=3Dpci.0,addr=3D0x4 \ --device vfio-pci,host=3D0001:01:00.0,id=3Dhostdev2,bus=3Dpci.0,addr=3D0x5 \ --device vfio-pci,host=3D0005:90:01.2,id=3Dhostdev3,bus=3Dpci.0,addr=3D0x6 \ --device vfio-pci,host=3D0005:90:01.3,id=3Dhostdev4,bus=3Dpci.0,addr=3D0x7 \ --device vfio-pci,host=3D06:12.1,id=3Dhostdev5,bus=3Dpci.0,addr=3D0x8 \ --device vfio-pci,host=3D06:12.2,id=3Dhostdev6,bus=3Dpci.0,addr=3D0x9 \ --device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0xa +-device vfio-pci,host=3D0005:90:01.0,id=3Dhostdev0,bus=3Dpci.0,multifuncti= on=3Don,\ +addr=3D0x3 \ +-device vfio-pci,host=3D0001:01:00.1,id=3Dhostdev1,bus=3Dpci.0,addr=3D0x4.= 0x1 \ +-device vfio-pci,host=3D0001:01:00.0,id=3Dhostdev2,bus=3Dpci.0,multifuncti= on=3Don,\ +addr=3D0x4 \ +-device vfio-pci,host=3D0005:90:01.2,id=3Dhostdev3,bus=3Dpci.0,addr=3D0x3.= 0x2 \ +-device vfio-pci,host=3D0005:90:01.3,id=3Dhostdev4,bus=3Dpci.0,addr=3D0x3.= 0x3 \ +-device vfio-pci,host=3D06:12.1,id=3Dhostdev5,bus=3Dpci.0,addr=3D0x5 \ +-device vfio-pci,host=3D06:12.2,id=3Dhostdev6,bus=3Dpci.0,addr=3D0x6 \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x7 diff --git a/tests/qemuxml2argvdata/pseries-hostdevs-1.args b/tests/qemuxml= 2argvdata/pseries-hostdevs-1.args index 8a4a4c5a63..6195350291 100644 --- a/tests/qemuxml2argvdata/pseries-hostdevs-1.args +++ b/tests/qemuxml2argvdata/pseries-hostdevs-1.args @@ -21,5 +21,6 @@ server,nowait \ -device spapr-pci-host-bridge,index=3D1,id=3Dpci.1 \ -device spapr-pci-host-bridge,index=3D2,id=3Dpci.2 \ -device vfio-pci,host=3D0005:90:01.0,id=3Dhostdev0,bus=3Dpci.1.0,addr=3D0x= 1 \ --device vfio-pci,host=3D0001:01:00.0,id=3Dhostdev1,bus=3Dpci.2.0,addr=3D0x= 1 \ --device vfio-pci,host=3D0001:01:00.1,id=3Dhostdev2,bus=3Dpci.2.0,addr=3D0x2 +-device vfio-pci,host=3D0001:01:00.0,id=3Dhostdev1,bus=3Dpci.2.0,multifunc= tion=3Don,\ +addr=3D0x1 \ +-device vfio-pci,host=3D0001:01:00.1,id=3Dhostdev2,bus=3Dpci.2.0,addr=3D0x= 1.0x1 diff --git a/tests/qemuxml2argvdata/pseries-hostdevs-3.args b/tests/qemuxml= 2argvdata/pseries-hostdevs-3.args index 66a31ba1a8..2e800574de 100644 --- a/tests/qemuxml2argvdata/pseries-hostdevs-3.args +++ b/tests/qemuxml2argvdata/pseries-hostdevs-3.args @@ -20,5 +20,6 @@ server,nowait \ -boot c \ -device spapr-pci-host-bridge,index=3D1,id=3Dpci.1 \ -device spapr-pci-host-bridge,index=3D2,id=3Dpci.2 \ --device vfio-pci,host=3D0001:01:00.0,id=3Dhostdev0,bus=3Dpci.2.0,addr=3D0x= 1 \ --device vfio-pci,host=3D0001:01:00.1,id=3Dhostdev1,bus=3Dpci.2.0,addr=3D0x2 +-device vfio-pci,host=3D0001:01:00.0,id=3Dhostdev0,bus=3Dpci.2.0,multifunc= tion=3Don,\ +addr=3D0x1 \ +-device vfio-pci,host=3D0001:01:00.1,id=3Dhostdev1,bus=3Dpci.2.0,addr=3D0x= 1.0x1 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 1e00eb167a..583598dfec 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1607,7 +1607,8 @@ mymain(void) DO_TEST("hostdev-pci-multifunction", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_VFIO_PCI, - QEMU_CAPS_HOST_PCI_MULTIDOMAIN, + QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY, + QEMU_CAPS_HOST_PCI_MULTIDOMAIN, QEMU_CAPS_PCI_MULTIFUNCTION); DO_TEST("hostdev-mdev-precreated", QEMU_CAPS_NODEFCONFIG, @@ -1905,6 +1906,7 @@ mymain(void) QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_HOST_PCI_MULTIDOMAIN, + QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VFIO_PCI); DO_TEST("pseries-hostdevs-2", @@ -1918,6 +1920,7 @@ mymain(void) QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_HOST_PCI_MULTIDOMAIN, QEMU_CAPS_VIRTIO_SCSI, + QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_VFIO_PCI); =20 DO_TEST("pseries-features-hpt", diff --git a/tests/qemuxml2xmloutdata/hostdev-pci-multifunction.xml b/tests= /qemuxml2xmloutdata/hostdev-pci-multifunction.xml index 52ed86e305..3396a73cf8 100644 --- a/tests/qemuxml2xmloutdata/hostdev-pci-multifunction.xml +++ b/tests/qemuxml2xmloutdata/hostdev-pci-multifunction.xml @@ -28,52 +28,52 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/tests/qemuxml2xmloutdata/pseries-hostdevs-1.xml b/tests/qemuxm= l2xmloutdata/pseries-hostdevs-1.xml index e77a060a38..c09588de9d 100644 --- a/tests/qemuxml2xmloutdata/pseries-hostdevs-1.xml +++ b/tests/qemuxml2xmloutdata/pseries-hostdevs-1.xml @@ -40,14 +40,14 @@
-
+
-
+
diff --git a/tests/qemuxml2xmloutdata/pseries-hostdevs-3.xml b/tests/qemuxm= l2xmloutdata/pseries-hostdevs-3.xml index f91959b805..f01adf6d25 100644 --- a/tests/qemuxml2xmloutdata/pseries-hostdevs-3.xml +++ b/tests/qemuxml2xmloutdata/pseries-hostdevs-3.xml @@ -32,14 +32,14 @@
-
+
-
+
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list