From nobody Sun Feb 8 03:57:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1643989004999843.5705147899859; Fri, 4 Feb 2022 07:36:44 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-215-iQNbVxXkN-Wm32B-4e3Ctw-1; Fri, 04 Feb 2022 10:36:42 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2E2A46415F; Fri, 4 Feb 2022 15:36:36 +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 2DB806F94E; Fri, 4 Feb 2022 15:36:33 +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 0F5E11809CB9; Fri, 4 Feb 2022 15:36:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 214FWUjb007809 for ; Fri, 4 Feb 2022 10:32:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9240C404727E; Fri, 4 Feb 2022 15:32:30 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8E0834047272 for ; Fri, 4 Feb 2022 15:32:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 759DF85A5BE for ; Fri, 4 Feb 2022 15:32:30 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-622-rZ9Ns7hZPSK5KAUN7am6Bw-1; Fri, 04 Feb 2022 10:32:27 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 214EIYTp009912; Fri, 4 Feb 2022 15:32:26 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3e0qx40bdv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Feb 2022 15:32:26 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 214FPYdf025919; Fri, 4 Feb 2022 15:32:24 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma04ams.nl.ibm.com with ESMTP id 3e0r10e5yy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Feb 2022 15:32:23 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 214FWLmm43450760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Feb 2022 15:32:21 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8705AA4053; Fri, 4 Feb 2022 15:32:21 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 62C82A404D; Fri, 4 Feb 2022 15:32:21 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.52.198]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 4 Feb 2022 15:32:21 +0000 (GMT) X-MC-Unique: iQNbVxXkN-Wm32B-4e3Ctw-1 X-MC-Unique: rZ9Ns7hZPSK5KAUN7am6Bw-1 From: Boris Fiuczynski To: libvir-list@redhat.com Subject: [PATCH 1/3] tests: correct formating in mdevctl test Date: Fri, 4 Feb 2022 16:32:16 +0100 Message-Id: <20220204153218.71177-2-fiuczy@linux.ibm.com> In-Reply-To: <20220204153218.71177-1-fiuczy@linux.ibm.com> References: <20220204153218.71177-1-fiuczy@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: bD_0UXSDhPabM_cPe_MVM1pJtQFGbjUy X-Proofpoint-GUID: bD_0UXSDhPabM_cPe_MVM1pJtQFGbjUy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205, Aquarius:18.0.816, Hydra:6.0.425, FMLib:17.11.62.513 definitions=2022-02-04_07,2022-02-03_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=927 lowpriorityscore=0 phishscore=0 clxscore=1015 impostorscore=0 adultscore=0 mlxscore=0 spamscore=0 suspectscore=0 malwarescore=0 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202040086 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-loop: libvir-list@redhat.com Cc: jjongsma@redhat.com 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.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643989006721100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Boris Fiuczynski Reviewed-by: Michal Privoznik --- .../mdevctl-list-multiple.json | 49 ++++++++++--------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/tests/nodedevmdevctldata/mdevctl-list-multiple.json b/tests/no= dedevmdevctldata/mdevctl-list-multiple.json index ca1918d00a..98e46584a0 100644 --- a/tests/nodedevmdevctldata/mdevctl-list-multiple.json +++ b/tests/nodedevmdevctldata/mdevctl-list-multiple.json @@ -26,30 +26,31 @@ } ], "matrix": [ - { "783e6dbb-ea0e-411f-94e2-717eaad438bf": { - "mdev_type": "vfio_ap-passthrough", - "start": "manual", - "attrs": [ - { - "assign_adapter": "5" - }, - { - "assign_adapter": "6" - }, - { - "assign_domain": "0xab" - }, - { - "assign_control_domain": "0xab" - }, - { - "assign_domain": "4" - }, - { - "assign_control_domain": "4" - } - ] - } + { + "783e6dbb-ea0e-411f-94e2-717eaad438bf": { + "mdev_type": "vfio_ap-passthrough", + "start": "manual", + "attrs": [ + { + "assign_adapter": "5" + }, + { + "assign_adapter": "6" + }, + { + "assign_domain": "0xab" + }, + { + "assign_control_domain": "0xab" + }, + { + "assign_domain": "4" + }, + { + "assign_control_domain": "4" + } + ] + } } ] } --=20 2.33.1 From nobody Sun Feb 8 03:57:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1643989025282846.8635746211494; Fri, 4 Feb 2022 07:37:05 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-104-jDAvc9kLNTS7Fy2OTJwLKQ-1; Fri, 04 Feb 2022 10:37:02 -0500 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 41E05874996; Fri, 4 Feb 2022 15:36:57 +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 1C82510A48CB; Fri, 4 Feb 2022 15:36:57 +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 B43781809CB8; Fri, 4 Feb 2022 15:36:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 214FWWA8007825 for ; Fri, 4 Feb 2022 10:32:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2710779D2; Fri, 4 Feb 2022 15:32:32 +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 21FF8776C for ; Fri, 4 Feb 2022 15:32:29 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ECCE3802E5B for ; Fri, 4 Feb 2022 15:32:28 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-225-Vd3RAx5mPgew6xtUeroBPg-1; Fri, 04 Feb 2022 10:32:27 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 214DuvqS016354; Fri, 4 Feb 2022 15:32:26 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0b-001b2d01.pphosted.com with ESMTP id 3e0yu5gbn0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Feb 2022 15:32:26 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 214FNfKe009108; Fri, 4 Feb 2022 15:32:24 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma01fra.de.ibm.com with ESMTP id 3e0r11nund-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Feb 2022 15:32:24 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 214FWL6L43450762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Feb 2022 15:32:22 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CC5EFA4053; Fri, 4 Feb 2022 15:32:21 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9800EA404D; Fri, 4 Feb 2022 15:32:21 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.52.198]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 4 Feb 2022 15:32:21 +0000 (GMT) X-MC-Unique: jDAvc9kLNTS7Fy2OTJwLKQ-1 X-MC-Unique: Vd3RAx5mPgew6xtUeroBPg-1 From: Boris Fiuczynski To: libvir-list@redhat.com Subject: [PATCH 2/3] tests: adding vfio-ccw to nodedev tests Date: Fri, 4 Feb 2022 16:32:17 +0100 Message-Id: <20220204153218.71177-3-fiuczy@linux.ibm.com> In-Reply-To: <20220204153218.71177-1-fiuczy@linux.ibm.com> References: <20220204153218.71177-1-fiuczy@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: ECKA-IPPMLwOlC3cQUlMZZzRLQi7l2ex X-Proofpoint-GUID: ECKA-IPPMLwOlC3cQUlMZZzRLQi7l2ex X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205, Aquarius:18.0.816, Hydra:6.0.425, FMLib:17.11.62.513 definitions=2022-02-04_06,2022-02-03_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 phishscore=0 clxscore=1015 mlxscore=0 bulkscore=0 malwarescore=0 spamscore=0 mlxlogscore=987 lowpriorityscore=0 adultscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202040086 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: jjongsma@redhat.com 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643989027395100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Boris Fiuczynski Reviewed-by: Michal Privoznik --- ...52_9b13_9b13_9b13_cc23009b1326-create.argv | 5 +++ ...52_9b13_9b13_9b13_cc23009b1326-create.json | 1 + ...52_9b13_9b13_9b13_cc23009b1326-define.argv | 5 +++ ...52_9b13_9b13_9b13_cc23009b1326-define.json | 1 + .../mdevctl-list-multiple.json | 9 ++++++ .../mdevctl-list-multiple.out.xml | 9 ++++++ tests/nodedevmdevctltest.c | 31 ++++++++++++++++++- ...v_cc000052_9b13_9b13_9b13_cc23009b1326.xml | 8 +++++ 8 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_c= c23009b1326-create.argv create mode 100644 tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_c= c23009b1326-create.json create mode 100644 tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_c= c23009b1326-define.argv create mode 100644 tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_c= c23009b1326-define.json create mode 100644 tests/nodedevschemadata/mdev_cc000052_9b13_9b13_9b13_cc= 23009b1326.xml diff --git a/tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_cc23009b= 1326-create.argv b/tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_cc= 23009b1326-create.argv new file mode 100644 index 0000000000..6d5c6e1cb8 --- /dev/null +++ b/tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_cc23009b1326-cr= eate.argv @@ -0,0 +1,5 @@ +mdevctl \ +start \ +--parent=3D0.0.0052 \ +--jsonfile=3D/dev/stdin \ +--uuid=3Dcc000052-9b13-9b13-9b13-cc23009b1326 diff --git a/tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_cc23009b= 1326-create.json b/tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_cc= 23009b1326-create.json new file mode 100644 index 0000000000..2dced5c695 --- /dev/null +++ b/tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_cc23009b1326-cr= eate.json @@ -0,0 +1 @@ +{"mdev_type":"vfio_ccw-io","start":"manual"} diff --git a/tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_cc23009b= 1326-define.argv b/tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_cc= 23009b1326-define.argv new file mode 100644 index 0000000000..997ce08fb8 --- /dev/null +++ b/tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_cc23009b1326-de= fine.argv @@ -0,0 +1,5 @@ +mdevctl \ +define \ +--parent=3D0.0.0052 \ +--jsonfile=3D/dev/stdin \ +--uuid=3Dcc000052-9b13-9b13-9b13-cc23009b1326 diff --git a/tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_cc23009b= 1326-define.json b/tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_cc= 23009b1326-define.json new file mode 100644 index 0000000000..2dced5c695 --- /dev/null +++ b/tests/nodedevmdevctldata/mdev_cc000052_9b13_9b13_9b13_cc23009b1326-de= fine.json @@ -0,0 +1 @@ +{"mdev_type":"vfio_ccw-io","start":"manual"} diff --git a/tests/nodedevmdevctldata/mdevctl-list-multiple.json b/tests/no= dedevmdevctldata/mdevctl-list-multiple.json index 98e46584a0..ee6641df6f 100644 --- a/tests/nodedevmdevctldata/mdevctl-list-multiple.json +++ b/tests/nodedevmdevctldata/mdevctl-list-multiple.json @@ -52,6 +52,15 @@ ] } } + ], + "0.0.0052": [ + { + "cc000052-9b13-9b13-9b13-cc23009b1326": { + "mdev_type": "vfio_ccw-io", + "start": "manual", + "attrs": [] + } + } ] } ] diff --git a/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml b/tests= /nodedevmdevctldata/mdevctl-list-multiple.out.xml index 4b558a1464..4df5f4f43c 100644 --- a/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml +++ b/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml @@ -41,3 +41,12 @@ + + mdev_cc000052_9b13_9b13_9b13_cc23009b1326_0_0_0052 + css_0_0_0052 + + + cc000052-9b13-9b13-9b13-cc23009b1326 + + + diff --git a/tests/nodedevmdevctltest.c b/tests/nodedevmdevctltest.c index 92d3c75766..d660d4cc21 100644 --- a/tests/nodedevmdevctltest.c +++ b/tests/nodedevmdevctltest.c @@ -331,6 +331,32 @@ fakeMatrixDevice(void) =20 return def; } + +/* Add a fake css device that can be used as a parent device for mediated + * devices. For our purposes, it only needs to have a name that matches the + * parent of the mdev, and it needs the proper name + */ +static virNodeDeviceDef * +fakeCSSDevice(void) +{ + virNodeDeviceDef *def =3D NULL; + virNodeDevCapCCW *css_dev; + + def =3D g_new0(virNodeDeviceDef, 1); + def->caps =3D g_new0(virNodeDevCapsDef, 1); + + def->name =3D g_strdup("css_0_0_0052"); + def->parent =3D g_strdup("computer"); + + def->caps->data.type =3D VIR_NODE_DEV_CAP_CSS_DEV; + css_dev =3D &def->caps->data.ccw_dev; + css_dev->cssid =3D 0; + css_dev->ssid =3D 0; + css_dev->devno =3D 82; + + return def; +} + static int addDevice(virNodeDeviceDef *def) { @@ -354,7 +380,8 @@ nodedevTestDriverAddTestDevices(void) { if (addDevice(fakeRootDevice()) < 0 || addDevice(fakePCIDevice()) < 0 || - addDevice(fakeMatrixDevice()) < 0) + addDevice(fakeMatrixDevice()) < 0 || + addDevice(fakeCSSDevice()) < 0) return -1; =20 return 0; @@ -437,6 +464,7 @@ mymain(void) DO_TEST_CREATE("mdev_d069d019_36ea_4111_8f0a_8c9a70e21366"); DO_TEST_CREATE("mdev_fedc4916_1ca8_49ac_b176_871d16c13076"); DO_TEST_CREATE("mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9"); + DO_TEST_CREATE("mdev_cc000052_9b13_9b13_9b13_cc23009b1326"); =20 /* Test mdevctl stop command, pass an arbitrary uuid */ DO_TEST_STOP("mdev_d069d019_36ea_4111_8f0a_8c9a70e21366"); @@ -449,6 +477,7 @@ mymain(void) DO_TEST_DEFINE("mdev_d069d019_36ea_4111_8f0a_8c9a70e21366"); DO_TEST_DEFINE("mdev_fedc4916_1ca8_49ac_b176_871d16c13076"); DO_TEST_DEFINE("mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9"); + DO_TEST_DEFINE("mdev_cc000052_9b13_9b13_9b13_cc23009b1326"); =20 DO_TEST_UNDEFINE("mdev_d069d019_36ea_4111_8f0a_8c9a70e21366"); =20 diff --git a/tests/nodedevschemadata/mdev_cc000052_9b13_9b13_9b13_cc23009b1= 326.xml b/tests/nodedevschemadata/mdev_cc000052_9b13_9b13_9b13_cc23009b1326= .xml new file mode 100644 index 0000000000..8a779464d8 --- /dev/null +++ b/tests/nodedevschemadata/mdev_cc000052_9b13_9b13_9b13_cc23009b1326.xml @@ -0,0 +1,8 @@ + + mdev_cc000052_9b13_9b13_9b13_cc23009b1326 + css_0_0_0052 + + + cc000052-9b13-9b13-9b13-cc23009b1326 + + --=20 2.33.1 From nobody Sun Feb 8 03:57:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1643989116663534.5244741720618; Fri, 4 Feb 2022 07:38:36 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-55--JLpJnZLN2uwxZJHBi3Fkg-1; Fri, 04 Feb 2022 10:38:34 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 33F9883DBE2; Fri, 4 Feb 2022 15:38:28 +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 A172422E1E; Fri, 4 Feb 2022 15:38:27 +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 700144BB7B; Fri, 4 Feb 2022 15:38:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 214FWVfH007814 for ; Fri, 4 Feb 2022 10:32:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 17A544047272; Fri, 4 Feb 2022 15:32: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 12903404727E for ; Fri, 4 Feb 2022 15:32: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-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EE178802E5C for ; Fri, 4 Feb 2022 15:32:30 +0000 (UTC) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-631-hTZwaQ18N1Sl4g5MpMuxQQ-1; Fri, 04 Feb 2022 10:32:27 -0500 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 214D79vb024605; Fri, 4 Feb 2022 15:32:26 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 3e0x2w2aqq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Feb 2022 15:32:26 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 214FPInW005030; Fri, 4 Feb 2022 15:32:24 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma03ams.nl.ibm.com with ESMTP id 3e0r0sp5e8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Feb 2022 15:32:24 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 214FWMwk47186270 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Feb 2022 15:32:22 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F03C2A405B; Fri, 4 Feb 2022 15:32:21 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DAE63A4059; Fri, 4 Feb 2022 15:32:21 +0000 (GMT) Received: from localhost.localdomain (unknown [9.145.52.198]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 4 Feb 2022 15:32:21 +0000 (GMT) X-MC-Unique: -JLpJnZLN2uwxZJHBi3Fkg-1 X-MC-Unique: hTZwaQ18N1Sl4g5MpMuxQQ-1 From: Boris Fiuczynski To: libvir-list@redhat.com Subject: [PATCH 3/3] nodedev: add parent_addr to mdev nodedev dumpxml Date: Fri, 4 Feb 2022 16:32:18 +0100 Message-Id: <20220204153218.71177-4-fiuczy@linux.ibm.com> In-Reply-To: <20220204153218.71177-1-fiuczy@linux.ibm.com> References: <20220204153218.71177-1-fiuczy@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: VvA3sA7qTT4WWSMut_S5QEeZnRNF7wfk X-Proofpoint-ORIG-GUID: VvA3sA7qTT4WWSMut_S5QEeZnRNF7wfk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205, Aquarius:18.0.816, Hydra:6.0.425, FMLib:17.11.62.513 definitions=2022-02-04_06,2022-02-03_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 phishscore=0 clxscore=1011 malwarescore=0 mlxscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2202040086 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-loop: libvir-list@redhat.com Cc: jjongsma@redhat.com 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.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1643989117569100001 Content-Type: text/plain; charset="utf-8" As the parent address is part of the mdev nodedev name lets expose the internally available parent address in the XML. Signed-off-by: Boris Fiuczynski Reviewed-by: Michal Privoznik --- docs/schemas/nodedev.rng | 5 +++++ src/conf/node_device_conf.c | 2 ++ tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng index e4733f0804..0d7d1168b6 100644 --- a/docs/schemas/nodedev.rng +++ b/docs/schemas/nodedev.rng @@ -644,6 +644,11 @@ + + + + + diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 0bac0fde8d..61c8715037 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -604,6 +604,8 @@ virNodeDeviceCapMdevDefFormat(virBuffer *buf, =20 virBufferEscapeString(buf, "\n", data->mdev.type); virBufferEscapeString(buf, "%s\n", data->mdev.uuid); + virBufferEscapeString(buf, "%s\n", + data->mdev.parent_addr); virBufferAsprintf(buf, "\n", data->mdev.iommuGroupNumber); =20 diff --git a/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml b/tests= /nodedevmdevctldata/mdevctl-list-multiple.out.xml index 4df5f4f43c..012c1a1596 100644 --- a/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml +++ b/tests/nodedevmdevctldata/mdevctl-list-multiple.out.xml @@ -4,6 +4,7 @@ 200f228a-c80a-4d50-bfb7-f5a0e4e34045 + 0000:00:02.0 @@ -13,6 +14,7 @@ de807ffc-1923-4d5f-b6c9-b20ecebc6d4b + 0000:00:02.0 @@ -22,6 +24,7 @@ 435722ea-5f43-468a-874f-da34f1217f13 + 0000:00:02.0 @@ -32,6 +35,7 @@ 783e6dbb-ea0e-411f-94e2-717eaad438bf + matrix @@ -47,6 +51,7 @@ cc000052-9b13-9b13-9b13-cc23009b1326 + 0.0.0052 --=20 2.33.1