From nobody Mon Feb 9 13:00:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1586429692; cv=none; d=zohomail.com; s=zohoarc; b=coPovLebAuw8jxpHliHnqNT/9UtQUjPsNOnP1ixnQIMCHiCdrpE5wQYmHAP6SGdueD3BjpSNqp+2XgspGRENuuHrHAmPDLdQ+zP2EZDKQbHhOo0ryE/H8WEO5OKQwK9Dkl9VLx+V8spGcyeAA0QTRRaSdXqlrvHriGSGh6SIZac= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586429692; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=H7I+u9x4O0jV3Qt/FSHM5tW02LqwUCfee4XLFD26fy8=; b=kUAvuSmrPrcDrrJrjGcmqTGHUfk9AYSVH/btj+ynJJFq7NwV/+izhVUl2/3sTyMIeDCT8+KdjxJV6cYspOGG/8aB14qz2Qehtns3Ok+6EhTZOOLpH0vpDauviXTo+PHly5RRL+UkHp7e/jkRkoGipIE0G4roPUDAEFPz4sLmm64= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1586429692878378.32471358606074; Thu, 9 Apr 2020 03:54:52 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-485-_x7LXe6dMG6DBkj_5UfWbQ-1; Thu, 09 Apr 2020 06:54:50 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A05928010EB; Thu, 9 Apr 2020 10:54:44 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 73E9910027B3; Thu, 9 Apr 2020 10:54:44 +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 2749A1803C43; Thu, 9 Apr 2020 10:54:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 039AVVw3017138 for ; Thu, 9 Apr 2020 06:31:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 87EF11005E2C; Thu, 9 Apr 2020 10:31:31 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 835DA10054EE for ; Thu, 9 Apr 2020 10:31:31 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6592A800297 for ; Thu, 9 Apr 2020 10:31:31 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-233-FI2x6u5nMcSP7s0ZEpcMog-1; Thu, 09 Apr 2020 06:31:28 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 039A3MWf178867 for ; Thu, 9 Apr 2020 06:31:27 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 309206afdf-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 09 Apr 2020 06:31:27 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 9 Apr 2020 11:30:59 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 9 Apr 2020 11:30:56 +0100 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 039AVL1P53215302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 9 Apr 2020 10:31:21 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D6BC4A40AC; Thu, 9 Apr 2020 10:31:19 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B807EA4060; Thu, 9 Apr 2020 10:31:19 +0000 (GMT) Received: from m46lp68.lnxne.boe (unknown [9.152.108.100]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 9 Apr 2020 10:31:19 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586429691; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=H7I+u9x4O0jV3Qt/FSHM5tW02LqwUCfee4XLFD26fy8=; b=LxwzrwtK6lg8+UINN7BojqBRxKs4xOrdHDwJJH8hPqk6DcW77VGtjVHOfh+Od7f+5N7Jy8 LDfgsEwbKCATOc5YcGQbQbhILljW7X+qsVYop2u/q5hS509sr3mRklRAIqT89dAHw4ML1M 9i84pSyC8a0acslxpthS+9wbDNVGwE8= X-MC-Unique: _x7LXe6dMG6DBkj_5UfWbQ-1 X-MC-Unique: FI2x6u5nMcSP7s0ZEpcMog-1 From: Shalini Chellathurai Saroja To: libvir-list@redhat.com Subject: [PATCH libvirt v1 3/6] conf: fix ZPCI address auto-generation on s390 Date: Thu, 9 Apr 2020 12:31:02 +0200 In-Reply-To: <20200409103105.45606-1-shalini@linux.ibm.com> References: <20200409103105.45606-1-shalini@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 20040910-4275-0000-0000-000003BCA383 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20040910-4276-0000-0000-000038D20B6F Message-Id: <20200409103105.45606-4-shalini@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-04-09_03:2020-04-07, 2020-04-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 phishscore=0 spamscore=0 suspectscore=1 mlxscore=0 adultscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004090075 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 039AVVw3017138 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Thu, 09 Apr 2020 06:54:38 -0400 Cc: Shalini Chellathurai Saroja 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Currently, if uid/fid is specified as zero by the user, it is treated as if the value is not specified. This bug is fixed by introducing two boolean values to identify if uid and fid are specified by the user. Also, if either uid or fid is specified by the user, it is incorrectly assumed that both uid and fid are specified. This bug is fixed by identifying when the user specified ZPCI address is incomplete and auto-generating the missing ZPCI address. Signed-off-by: Boris Fiuczynski Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/conf/device_conf.c | 12 ++-- src/conf/domain_addr.c | 59 +++++++++++++------ src/conf/domain_conf.c | 2 +- src/libvirt_private.syms | 3 +- src/qemu/qemu_validate.c | 2 +- src/util/virpci.c | 17 ++++-- src/util/virpci.h | 5 +- .../hostdev-vfio-zpci-multidomain-many.args | 6 +- .../hostdev-vfio-zpci-multidomain-many.xml | 6 +- 9 files changed, 75 insertions(+), 37 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index 001ed929..c03356e7 100644 --- a/src/conf/device_conf.c +++ b/src/conf/device_conf.c @@ -65,8 +65,7 @@ virZPCIDeviceAddressParseXML(xmlNodePtr node, _("Cannot parse
'uid' attribute")); return -1; } - if (!virZPCIDeviceAddressIsValid(&def)) - return -1; + def.uid_set =3D true; } =20 if (fid) { @@ -75,8 +74,11 @@ virZPCIDeviceAddressParseXML(xmlNodePtr node, _("Cannot parse
'fid' attribute")); return -1; } + def.fid_set =3D true; } =20 + if (!virZPCIDeviceAddressIsValid(&def)) + return -1; =20 addr->zpci =3D def; =20 @@ -191,22 +193,20 @@ virDeviceInfoPCIAddressIsPresent(const virDomainDevic= eInfo *info) !virPCIDeviceAddressIsEmpty(&info->addr.pci); } =20 - bool virDeviceInfoPCIAddressExtensionIsWanted(const virDomainDeviceInfo *info) { return (info->addr.pci.extFlags & VIR_PCI_ADDRESS_EXTENSION_ZPCI) && - virZPCIDeviceAddressIsEmpty(&info->addr.pci.zpci); + virZPCIDeviceAddressIsIncomplete(&info->addr.pci.zpci); } =20 bool virDeviceInfoPCIAddressExtensionIsPresent(const virDomainDeviceInfo *info) { return (info->addr.pci.extFlags & VIR_PCI_ADDRESS_EXTENSION_ZPCI) && - !virZPCIDeviceAddressIsEmpty(&info->addr.pci.zpci); + virZPCIDeviceAddressIsPresent(&info->addr.pci.zpci); } =20 - int virPCIDeviceAddressParseXML(xmlNodePtr node, virPCIDeviceAddressPtr addr) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index e8629b3e..d1cd0804 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -145,12 +145,18 @@ static void virDomainZPCIAddressReleaseIds(virDomainZPCIAddressIdsPtr zpciIds, virZPCIDeviceAddressPtr addr) { - if (!zpciIds || virZPCIDeviceAddressIsEmpty(addr)) + if (!zpciIds) return; =20 - virDomainZPCIAddressReleaseUid(zpciIds->uids, addr); + if (addr->uid_set) { + virDomainZPCIAddressReleaseUid(zpciIds->uids, addr); + addr->uid_set =3D false; + } =20 - virDomainZPCIAddressReleaseFid(zpciIds->fids, addr); + if (addr->fid_set) { + virDomainZPCIAddressReleaseFid(zpciIds->fids, addr); + addr->fid_set =3D false; + } } =20 =20 @@ -186,12 +192,16 @@ static int virDomainZPCIAddressReserveAddr(virDomainZPCIAddressIdsPtr zpciIds, virZPCIDeviceAddressPtr addr) { - if (virDomainZPCIAddressReserveUid(zpciIds->uids, addr) < 0) + if (addr->uid_set && + virDomainZPCIAddressReserveUid(zpciIds->uids, addr) < 0) return -1; =20 - if (virDomainZPCIAddressReserveFid(zpciIds->fids, addr) < 0) { - virDomainZPCIAddressReleaseUid(zpciIds->uids, addr); - return -1; + if (addr->fid_set) { + if (virDomainZPCIAddressReserveFid(zpciIds->fids, addr) < 0) { + if (addr->uid_set) + virDomainZPCIAddressReleaseUid(zpciIds->uids, addr); + return -1; + } } =20 return 0; @@ -202,14 +212,28 @@ static int virDomainZPCIAddressReserveNextAddr(virDomainZPCIAddressIdsPtr zpciIds, virZPCIDeviceAddressPtr addr) { - if (virDomainZPCIAddressReserveNextUid(zpciIds->uids, addr) < 0) - return -1; + bool uid_set, fid_set =3D false; =20 - if (virDomainZPCIAddressReserveNextFid(zpciIds->fids, addr) < 0) { - virDomainZPCIAddressReleaseUid(zpciIds->uids, addr); - return -1; + if (!addr->uid_set) { + if (virDomainZPCIAddressReserveNextUid(zpciIds->uids, addr) < 0) + return -1; + uid_set =3D true; + } + + if (!addr->fid_set) { + if (virDomainZPCIAddressReserveNextFid(zpciIds->fids, addr) < 0) { + if (uid_set) + virDomainZPCIAddressReleaseUid(zpciIds->uids, addr); + return -1; + } + fid_set =3D true; } =20 + if (uid_set) + addr->uid_set =3D true; + if (fid_set) + addr->fid_set =3D true; + return 0; } =20 @@ -234,7 +258,7 @@ virDomainPCIAddressExtensionReserveNextAddr(virDomainPC= IAddressSetPtr addrs, virPCIDeviceAddressPtr addr) { if (addr->extFlags & VIR_PCI_ADDRESS_EXTENSION_ZPCI) { - virZPCIDeviceAddress zpci =3D { 0 }; + virZPCIDeviceAddress zpci =3D addr->zpci; =20 if (virDomainZPCIAddressReserveNextAddr(addrs->zpciIds, &zpci) < 0) return -1; @@ -246,6 +270,7 @@ virDomainPCIAddressExtensionReserveNextAddr(virDomainPC= IAddressSetPtr addrs, return 0; } =20 + static int virDomainPCIAddressExtensionEnsureAddr(virDomainPCIAddressSetPtr addrs, virPCIDeviceAddressPtr addr) @@ -253,10 +278,10 @@ virDomainPCIAddressExtensionEnsureAddr(virDomainPCIAd= dressSetPtr addrs, if (addr->extFlags & VIR_PCI_ADDRESS_EXTENSION_ZPCI) { virZPCIDeviceAddressPtr zpci =3D &addr->zpci; =20 - if (virZPCIDeviceAddressIsEmpty(zpci)) - return virDomainZPCIAddressReserveNextAddr(addrs->zpciIds, zpc= i); - else - return virDomainZPCIAddressReserveAddr(addrs->zpciIds, zpci); + if (virDomainZPCIAddressReserveAddr(addrs->zpciIds, zpci) < 0) + return -1; + + return virDomainZPCIAddressReserveNextAddr(addrs->zpciIds, zpci); } =20 return 0; diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c478d795..5df80cae 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7471,7 +7471,7 @@ virDomainDeviceInfoFormat(virBufferPtr buf, virTristateSwitchTypeToString(info->addr.pci= .multi)); } =20 - if (!virZPCIDeviceAddressIsEmpty(&info->addr.pci.zpci)) { + if (!virZPCIDeviceAddressIsIncomplete(&info->addr.pci.zpci)) { virBufferAsprintf(&childBuf, "\n", info->addr.pci.zpci.uid, diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index ec367653..18687563 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2821,7 +2821,8 @@ virPCIHeaderTypeToString; virPCIIsVirtualFunction; virPCIStubDriverTypeFromString; virPCIStubDriverTypeToString; -virZPCIDeviceAddressIsEmpty; +virZPCIDeviceAddressIsIncomplete; +virZPCIDeviceAddressIsPresent; virZPCIDeviceAddressIsValid; =20 =20 diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 149b9e73..22fdfd11 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -952,7 +952,7 @@ static int qemuValidateDomainDeviceDefZPCIAddress(virDomainDeviceInfoPtr info, virQEMUCapsPtr qemuCaps) { - if (!virZPCIDeviceAddressIsEmpty(&info->addr.pci.zpci) && + if (virZPCIDeviceAddressIsPresent(&info->addr.pci.zpci) && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_ZPCI)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", diff --git a/src/util/virpci.c b/src/util/virpci.c index 6c7e6bbc..b38f717c 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -2172,8 +2172,9 @@ virZPCIDeviceAddressIsValid(virZPCIDeviceAddressPtr z= pci) /* We don't need to check fid because fid covers * all range of uint32 type. */ - if (zpci->uid > VIR_DOMAIN_DEVICE_ZPCI_MAX_UID || - zpci->uid =3D=3D 0) { + if (zpci->uid_set && + (zpci->uid > VIR_DOMAIN_DEVICE_ZPCI_MAX_UID || + zpci->uid =3D=3D 0)) { virReportError(VIR_ERR_XML_ERROR, _("Invalid PCI address uid=3D'0x%.4x', " "must be > 0x0000 and <=3D 0x%.4x"), @@ -2186,11 +2187,19 @@ virZPCIDeviceAddressIsValid(virZPCIDeviceAddressPtr= zpci) } =20 bool -virZPCIDeviceAddressIsEmpty(const virZPCIDeviceAddress *addr) +virZPCIDeviceAddressIsIncomplete(const virZPCIDeviceAddress *addr) { - return !(addr->uid || addr->fid); + return !addr->uid_set || !addr->fid_set; } =20 + +bool +virZPCIDeviceAddressIsPresent(const virZPCIDeviceAddress *addr) +{ + return addr->uid_set || addr->fid_set; +} + + #ifdef __linux__ =20 virPCIDeviceAddressPtr diff --git a/src/util/virpci.h b/src/util/virpci.h index f16d2361..e937348f 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -43,6 +43,8 @@ typedef virZPCIDeviceAddress *virZPCIDeviceAddressPtr; struct _virZPCIDeviceAddress { unsigned int uid; /* exempt from syntax-check */ unsigned int fid; + bool uid_set; + bool fid_set; /* Don't forget to update virPCIDeviceAddressCopy if needed. */ }; =20 @@ -245,8 +247,9 @@ char *virPCIDeviceAddressAsString(const virPCIDeviceAdd= ress *addr) =20 int virPCIDeviceAddressParse(char *address, virPCIDeviceAddressPtr bdf); =20 +bool virZPCIDeviceAddressIsIncomplete(const virZPCIDeviceAddress *addr); +bool virZPCIDeviceAddressIsPresent(const virZPCIDeviceAddress *addr); bool virZPCIDeviceAddressIsValid(virZPCIDeviceAddressPtr zpci); -bool virZPCIDeviceAddressIsEmpty(const virZPCIDeviceAddress *addr); =20 int virPCIGetVirtualFunctionInfo(const char *vf_sysfs_device_path, int pfNetDevIdx, diff --git a/tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.args= b/tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.args index 3dd9a25f..0fae78db 100644 --- a/tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.args +++ b/tests/qemuxml2argvdata/hostdev-vfio-zpci-multidomain-many.args @@ -27,11 +27,11 @@ server,nowait \ -device vfio-pci,host=3D0001:00:00.0,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ -device zpci,uid=3D53,fid=3D104,target=3Dhostdev1,id=3Dzpci53 \ -device vfio-pci,host=3D0002:00:00.0,id=3Dhostdev1,bus=3Dpci.0,addr=3D0x1 \ --device zpci,uid=3D1,fid=3D1,target=3Dhostdev2,id=3Dzpci1 \ +-device zpci,uid=3D1,fid=3D0,target=3Dhostdev2,id=3Dzpci1 \ -device vfio-pci,host=3D0003:00:00.0,id=3Dhostdev2,bus=3Dpci.0,addr=3D0x2 \ --device zpci,uid=3D2,fid=3D2,target=3Dhostdev3,id=3Dzpci2 \ +-device zpci,uid=3D2,fid=3D1,target=3Dhostdev3,id=3Dzpci2 \ -device vfio-pci,host=3D0004:00:00.0,id=3Dhostdev3,bus=3Dpci.0,addr=3D0x5 \ --device zpci,uid=3D83,fid=3D0,target=3Dhostdev4,id=3Dzpci83 \ +-device zpci,uid=3D83,fid=3D2,target=3Dhostdev4,id=3Dzpci83 \ -device vfio-pci,host=3D0005:00:00.0,id=3Dhostdev4,bus=3Dpci.0,addr=3D0x7 \ -device zpci,uid=3D3,fid=3D114,target=3Dhostdev5,id=3Dzpci3 \ -device vfio-pci,host=3D0006:00:00.0,id=3Dhostdev5,bus=3Dpci.0,addr=3D0x9 \ diff --git a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-multidomain-many.xm= l b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-multidomain-many.xml index e56106d1..ecfc15c4 100644 --- a/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-multidomain-many.xml +++ b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-multidomain-many.xml @@ -39,7 +39,7 @@
- +
@@ -48,7 +48,7 @@
- +
@@ -57,7 +57,7 @@
- +
--=20 2.21.1