From nobody Thu Nov 28 17:55:57 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 1521099202241179.3130819155583; Thu, 15 Mar 2018 00:33:22 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0029E7FEC0; Thu, 15 Mar 2018 07:33:21 +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 CE51518A26; Thu, 15 Mar 2018 07:33:20 +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 65EFE180BADA; Thu, 15 Mar 2018 07:33:20 +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 w2EHH7rm024460 for ; Wed, 14 Mar 2018 13:17:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4559A60476; Wed, 14 Mar 2018 17:17:07 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3E6CD6134A for ; Wed, 14 Mar 2018 17:17:03 +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 D028D47D2 for ; Wed, 14 Mar 2018 17:17:01 +0000 (UTC) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2EHF5hE086644 for ; Wed, 14 Mar 2018 13:17:01 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gq5fk7hte-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 14 Mar 2018 13:17:00 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Mar 2018 17:16:59 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 14 Mar 2018 17:16:58 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2EHGvQN50462760 for ; Wed, 14 Mar 2018 17:16:57 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0C7114204B for ; Wed, 14 Mar 2018 17:09:12 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D6D3C42041 for ; Wed, 14 Mar 2018 17:09:10 +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:09:10 +0000 (GMT) From: Shivaprasad G Bhat To: libvir-list@redhat.com Date: Wed, 14 Mar 2018 22:46:55 +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-0016-0000-0000-000005327906 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031417-0017-0000-0000-0000286F7EB7 Message-Id: <152104780648.10112.13439559210950099731.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.30]); Wed, 14 Mar 2018 17:17:02 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 14 Mar 2018 17:17:02 +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.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [RFC PATCH 05/28] virpcimock: Mock the SRIOV Virtual functions 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 15 Mar 2018 07:33:21 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The softlink to physfn is the way to know if the device is VF or not. So, the patch softlinks 'physfn' to the parent function. The multifunction PCI devices dont have 'physfn' softlinks. The patch adds few Virtual functions to the mock environment and changes the existing test xmls using the VFs to use the newly added VFs for their use case. Signed-off-by: Shivaprasad G Bhat --- .../hostdev-pci-address-device.args | 2 +- .../hostdev-pci-address-device.xml | 2 +- tests/qemuxml2argvdata/hostdev-pci-address.args | 2 +- tests/qemuxml2argvdata/hostdev-pci-address.xml | 2 +- .../qemuxml2argvdata/hostdev-vfio-multidomain.args | 2 +- .../qemuxml2argvdata/hostdev-vfio-multidomain.xml | 2 +- tests/qemuxml2argvdata/hostdev-vfio.args | 2 +- tests/qemuxml2argvdata/hostdev-vfio.xml | 2 +- tests/qemuxml2argvdata/net-hostdev-fail.xml | 2 +- .../qemuxml2argvdata/net-hostdev-multidomain.args | 2 +- tests/qemuxml2argvdata/net-hostdev-multidomain.xml | 2 +- tests/qemuxml2argvdata/net-hostdev-vfio.args | 2 +- tests/qemuxml2argvdata/net-hostdev-vfio.xml | 2 +- tests/qemuxml2argvdata/net-hostdev.args | 2 +- tests/qemuxml2argvdata/net-hostdev.xml | 2 +- tests/qemuxml2argvdata/pci-rom.args | 4 ++-- tests/qemuxml2argvdata/pci-rom.xml | 4 ++-- tests/qemuxml2xmloutdata/hostdev-pci-address.xml | 2 +- tests/qemuxml2xmloutdata/hostdev-vfio.xml | 2 +- tests/qemuxml2xmloutdata/net-hostdev-vfio.xml | 2 +- tests/qemuxml2xmloutdata/net-hostdev.xml | 2 +- tests/qemuxml2xmloutdata/pci-rom.xml | 4 ++-- tests/virpcimock.c | 14 ++++++++++++++ tests/virpcitestdata/0000-06-12.0.config | Bin tests/virpcitestdata/0000-06-12.1.config | Bin tests/virpcitestdata/0000-06-12.2.config | Bin 26 files changed, 39 insertions(+), 25 deletions(-) create mode 100644 tests/virpcitestdata/0000-06-12.0.config create mode 100644 tests/virpcitestdata/0000-06-12.1.config create mode 100644 tests/virpcitestdata/0000-06-12.2.config diff --git a/tests/qemuxml2argvdata/hostdev-pci-address-device.args b/tests= /qemuxml2argvdata/hostdev-pci-address-device.args index a250082e1e..93221b6e9d 100644 --- a/tests/qemuxml2argvdata/hostdev-pci-address-device.args +++ b/tests/qemuxml2argvdata/hostdev-pci-address-device.args @@ -22,5 +22,5 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --device pci-assign,host=3D06:12.5,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ +-device pci-assign,host=3D06:12.1,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 diff --git a/tests/qemuxml2argvdata/hostdev-pci-address-device.xml b/tests/= qemuxml2argvdata/hostdev-pci-address-device.xml index 814fdcc271..492031d5a9 100644 --- a/tests/qemuxml2argvdata/hostdev-pci-address-device.xml +++ b/tests/qemuxml2argvdata/hostdev-pci-address-device.xml @@ -20,7 +20,7 @@ -
+
diff --git a/tests/qemuxml2argvdata/hostdev-pci-address.args b/tests/qemuxm= l2argvdata/hostdev-pci-address.args index 1f3a2443bf..728712a1c1 100644 --- a/tests/qemuxml2argvdata/hostdev-pci-address.args +++ b/tests/qemuxml2argvdata/hostdev-pci-address.args @@ -21,4 +21,4 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --device pci-assign,host=3D06:12.5,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 +-device pci-assign,host=3D06:12.1,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/hostdev-pci-address.xml b/tests/qemuxml= 2argvdata/hostdev-pci-address.xml index 17968350ff..af7e300c57 100644 --- a/tests/qemuxml2argvdata/hostdev-pci-address.xml +++ b/tests/qemuxml2argvdata/hostdev-pci-address.xml @@ -27,7 +27,7 @@ -
+
diff --git a/tests/qemuxml2argvdata/hostdev-vfio-multidomain.args b/tests/q= emuxml2argvdata/hostdev-vfio-multidomain.args index 492e9b35e0..87ea9e7e09 100644 --- a/tests/qemuxml2argvdata/hostdev-vfio-multidomain.args +++ b/tests/qemuxml2argvdata/hostdev-vfio-multidomain.args @@ -22,5 +22,5 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --device vfio-pci,host=3D55aa:20:0f.3,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ +-device vfio-pci,host=3D0021:de:1f.1,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 diff --git a/tests/qemuxml2argvdata/hostdev-vfio-multidomain.xml b/tests/qe= muxml2argvdata/hostdev-vfio-multidomain.xml index 832458125b..7c34b65c7f 100644 --- a/tests/qemuxml2argvdata/hostdev-vfio-multidomain.xml +++ b/tests/qemuxml2argvdata/hostdev-vfio-multidomain.xml @@ -25,7 +25,7 @@ -
+
diff --git a/tests/qemuxml2argvdata/hostdev-vfio.args b/tests/qemuxml2argvd= ata/hostdev-vfio.args index ba54d03e8e..d7cc2b7246 100644 --- a/tests/qemuxml2argvdata/hostdev-vfio.args +++ b/tests/qemuxml2argvdata/hostdev-vfio.args @@ -22,5 +22,5 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest2,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --device vfio-pci,host=3D06:12.5,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ +-device vfio-pci,host=3D06:12.1,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 diff --git a/tests/qemuxml2argvdata/hostdev-vfio.xml b/tests/qemuxml2argvda= ta/hostdev-vfio.xml index 4d96b9f732..b2e6c62e7e 100644 --- a/tests/qemuxml2argvdata/hostdev-vfio.xml +++ b/tests/qemuxml2argvdata/hostdev-vfio.xml @@ -27,7 +27,7 @@ -
+
diff --git a/tests/qemuxml2argvdata/net-hostdev-fail.xml b/tests/qemuxml2ar= gvdata/net-hostdev-fail.xml index c815d68bd9..50b102c658 100644 --- a/tests/qemuxml2argvdata/net-hostdev-fail.xml +++ b/tests/qemuxml2argvdata/net-hostdev-fail.xml @@ -25,7 +25,7 @@ -
+
diff --git a/tests/qemuxml2argvdata/net-hostdev-multidomain.args b/tests/qe= muxml2argvdata/net-hostdev-multidomain.args index 7d27964715..58696a4a9c 100644 --- a/tests/qemuxml2argvdata/net-hostdev-multidomain.args +++ b/tests/qemuxml2argvdata/net-hostdev-multidomain.args @@ -22,5 +22,5 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --device pci-assign,host=3D2424:21:1c.6,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x= 3 \ +-device pci-assign,host=3D0021:de:1f.1,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x= 3 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 diff --git a/tests/qemuxml2argvdata/net-hostdev-multidomain.xml b/tests/qem= uxml2argvdata/net-hostdev-multidomain.xml index 27e5f0f724..71d053a3da 100644 --- a/tests/qemuxml2argvdata/net-hostdev-multidomain.xml +++ b/tests/qemuxml2argvdata/net-hostdev-multidomain.xml @@ -25,7 +25,7 @@ -
+
diff --git a/tests/qemuxml2argvdata/net-hostdev-vfio.args b/tests/qemuxml2a= rgvdata/net-hostdev-vfio.args index 7247c6c1f2..6dfbe61689 100644 --- a/tests/qemuxml2argvdata/net-hostdev-vfio.args +++ b/tests/qemuxml2argvdata/net-hostdev-vfio.args @@ -22,5 +22,5 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --device vfio-pci,host=3D03:07.1,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ +-device vfio-pci,host=3D06:12.1,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 diff --git a/tests/qemuxml2argvdata/net-hostdev-vfio.xml b/tests/qemuxml2ar= gvdata/net-hostdev-vfio.xml index 24034cad8b..aff681c0fb 100644 --- a/tests/qemuxml2argvdata/net-hostdev-vfio.xml +++ b/tests/qemuxml2argvdata/net-hostdev-vfio.xml @@ -26,7 +26,7 @@ -
+
diff --git a/tests/qemuxml2argvdata/net-hostdev.args b/tests/qemuxml2argvda= ta/net-hostdev.args index e137a0a5b1..7663821e53 100644 --- a/tests/qemuxml2argvdata/net-hostdev.args +++ b/tests/qemuxml2argvdata/net-hostdev.args @@ -22,5 +22,5 @@ server,nowait \ -usb \ -drive file=3D/dev/HostVG/QEMUGuest1,format=3Draw,if=3Dnone,id=3Ddrive-ide= 0-0-0 \ -device ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-= 0 \ --device pci-assign,host=3D03:07.1,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ +-device pci-assign,host=3D06:12.1,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x3 \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 diff --git a/tests/qemuxml2argvdata/net-hostdev.xml b/tests/qemuxml2argvdat= a/net-hostdev.xml index 829d8b850b..9949e6ef30 100644 --- a/tests/qemuxml2argvdata/net-hostdev.xml +++ b/tests/qemuxml2argvdata/net-hostdev.xml @@ -25,7 +25,7 @@ -
+
diff --git a/tests/qemuxml2argvdata/pci-rom.args b/tests/qemuxml2argvdata/p= ci-rom.args index b50581283e..9451d7613a 100644 --- a/tests/qemuxml2argvdata/pci-rom.args +++ b/tests/qemuxml2argvdata/pci-rom.args @@ -28,7 +28,7 @@ rombar=3D1 \ -device virtio-net-pci,vlan=3D1,id=3Dnet1,mac=3D52:54:00:24:a5:9e,bus=3Dpc= i.0,addr=3D0x4,\ romfile=3D/etc/fake/bootrom.bin \ -net user,vlan=3D1,name=3Dhostnet1 \ --device pci-assign,host=3D06:12.5,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x5,rom= bar=3D0 \ --device pci-assign,host=3D06:12.6,id=3Dhostdev1,bus=3Dpci.0,addr=3D0x6,rom= bar=3D1,\ +-device pci-assign,host=3D06:12.1,id=3Dhostdev0,bus=3Dpci.0,addr=3D0x5,rom= bar=3D0 \ +-device pci-assign,host=3D06:12.2,id=3Dhostdev1,bus=3Dpci.0,addr=3D0x6,rom= bar=3D1,\ romfile=3D/etc/fake/bootrom.bin \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x7 diff --git a/tests/qemuxml2argvdata/pci-rom.xml b/tests/qemuxml2argvdata/pc= i-rom.xml index 09cafb35a9..048bcd3b59 100644 --- a/tests/qemuxml2argvdata/pci-rom.xml +++ b/tests/qemuxml2argvdata/pci-rom.xml @@ -36,13 +36,13 @@ -
+
-
+
diff --git a/tests/qemuxml2xmloutdata/hostdev-pci-address.xml b/tests/qemux= ml2xmloutdata/hostdev-pci-address.xml index 59cb86e1d5..1e80b9b387 100644 --- a/tests/qemuxml2xmloutdata/hostdev-pci-address.xml +++ b/tests/qemuxml2xmloutdata/hostdev-pci-address.xml @@ -31,7 +31,7 @@ -
+
diff --git a/tests/qemuxml2xmloutdata/hostdev-vfio.xml b/tests/qemuxml2xmlo= utdata/hostdev-vfio.xml index 77bd62a129..15a845f4d1 100644 --- a/tests/qemuxml2xmloutdata/hostdev-vfio.xml +++ b/tests/qemuxml2xmloutdata/hostdev-vfio.xml @@ -32,7 +32,7 @@ -
+
diff --git a/tests/qemuxml2xmloutdata/net-hostdev-vfio.xml b/tests/qemuxml2= xmloutdata/net-hostdev-vfio.xml index 0523cd8d3b..3f057a8249 100644 --- a/tests/qemuxml2xmloutdata/net-hostdev-vfio.xml +++ b/tests/qemuxml2xmloutdata/net-hostdev-vfio.xml @@ -31,7 +31,7 @@ -
+
diff --git a/tests/qemuxml2xmloutdata/net-hostdev.xml b/tests/qemuxml2xmlou= tdata/net-hostdev.xml index bede4b034f..0141a0c5a3 100644 --- a/tests/qemuxml2xmloutdata/net-hostdev.xml +++ b/tests/qemuxml2xmloutdata/net-hostdev.xml @@ -30,7 +30,7 @@ -
+
diff --git a/tests/qemuxml2xmloutdata/pci-rom.xml b/tests/qemuxml2xmloutdat= a/pci-rom.xml index 982231fefe..5b5a8b217b 100644 --- a/tests/qemuxml2xmloutdata/pci-rom.xml +++ b/tests/qemuxml2xmloutdata/pci-rom.xml @@ -43,14 +43,14 @@ -
+
-
+
diff --git a/tests/virpcimock.c b/tests/virpcimock.c index c9b7434c9a..abe08a30ea 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -134,6 +134,7 @@ struct pciDevice { int device; int class; int iommuGroup; + const char *physfn; struct pciDriver *driver; /* Driver attached. NULL if attached to no= driver */ }; =20 @@ -433,6 +434,14 @@ pci_device_new_from_stub(const struct pciDevice *data) } make_symlink(devpath, "iommu_group", tmp); =20 + if (dev->physfn) { + if (snprintf(tmp, sizeof(tmp), + "%s/devices/%s", fakesysfspcidir, dev->physfn) < 0) { + ABORT("@tmp overflow"); + } + make_symlink(devpath, "physfn", tmp); + } + if (pci_device_autobind(dev) < 0) ABORT("Unable to bind: %s", data->id); =20 @@ -1007,6 +1016,11 @@ init_env(void) MAKE_PCI_DEVICE("0000:0a:01.0", 0x8086, 0x0047, .iommuGroup =3D 8); MAKE_PCI_DEVICE("0000:0a:02.0", 0x8286, 0x0048, .iommuGroup =3D 8); MAKE_PCI_DEVICE("0000:0a:03.0", 0x8386, 0x0048, .iommuGroup =3D 8); + MAKE_PCI_DEVICE("0000:06:12.0", 0x8086, 0x0047, .iommuGroup =3D 9); + MAKE_PCI_DEVICE("0000:06:12.1", 0x8086, 0x0047, .iommuGroup =3D 10, .p= hysfn =3D "0000:06:12.0"); /* Virtual Function */ + MAKE_PCI_DEVICE("0000:06:12.2", 0x8086, 0x0047, .iommuGroup =3D 11, .p= hysfn =3D "0000:06:12.0"); /* Virtual Function */ + MAKE_PCI_DEVICE("0021:de:1f.0", 0x8086, 0x0047, .iommuGroup =3D 12); + MAKE_PCI_DEVICE("0021:de:1f.1", 0x8086, 0x0047, .iommuGroup =3D 13, .p= hysfn =3D "0021:de:1f.0"); /* Virtual Function */ } =20 =20 diff --git a/tests/virpcitestdata/0000-06-12.0.config b/tests/virpcitestdat= a/0000-06-12.0.config new file mode 100644 index 0000000000000000000000000000000000000000..beee76534041a7020c08ae9ac03= d9a349c6ea12e GIT binary patch literal 256 ycmXpOFlAt45MXi^VCG@qU|?VnU}yr8Sb;H6EeJS(Ng%<*sKv;@R0rb@MH&E<&;s)S literal 0 HcmV?d00001 diff --git a/tests/virpcitestdata/0000-06-12.1.config b/tests/virpcitestdat= a/0000-06-12.1.config new file mode 100644 index 0000000000000000000000000000000000000000..beee76534041a7020c08ae9ac03= d9a349c6ea12e GIT binary patch literal 256 ycmXpOFlAt45MXi^VCG@qU|?VnU}yr8Sb;H6EeJS(Ng%<*sKv;@R0rb@MH&E<&;s)S literal 0 HcmV?d00001 diff --git a/tests/virpcitestdata/0000-06-12.2.config b/tests/virpcitestdat= a/0000-06-12.2.config new file mode 100644 index 0000000000000000000000000000000000000000..beee76534041a7020c08ae9ac03= d9a349c6ea12e GIT binary patch literal 256 ycmXpOFlAt45MXi^VCG@qU|?VnU}yr8Sb;H6EeJS(Ng%<*sKv;@R0rb@MH&E<&;s)S literal 0 HcmV?d00001 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list