From nobody Wed May 14 09:52:42 2025 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; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1525704434831987.7986598394838; Mon, 7 May 2018 07:47:14 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5E236C0005C5; Mon, 7 May 2018 14:47:13 +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 1E5489C9BB; Mon, 7 May 2018 14:47:13 +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 BF1BA4CAA7; Mon, 7 May 2018 14:47:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w47EfabM001161 for ; Mon, 7 May 2018 10:41:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id CB6D65C293; Mon, 7 May 2018 14:41:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD76168D86 for ; Mon, 7 May 2018 14:41:36 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 C785630015CA for ; Mon, 7 May 2018 14:41:35 +0000 (UTC) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w47EeUsx081973 for ; Mon, 7 May 2018 10:41:35 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2htqx32h3w-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 07 May 2018 10:41:35 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 May 2018 15:41:33 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 7 May 2018 15:41:30 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w47EfTNt4850110; Mon, 7 May 2018 14:41:29 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E8209AE056; Mon, 7 May 2018 15:30:58 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BBE8CAE045; Mon, 7 May 2018 15:30:58 +0100 (BST) Received: from localhost.localdomain (unknown [9.152.222.69]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 7 May 2018 15:30:58 +0100 (BST) From: Boris Fiuczynski To: libvir-list@redhat.com Date: Mon, 7 May 2018 16:41:17 +0200 In-Reply-To: <20180507144118.6260-1-fiuczy@linux.ibm.com> References: <20180507144118.6260-1-fiuczy@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18050714-0040-0000-0000-00000455FC58 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18050714-0041-0000-0000-000020FA3778 Message-Id: <20180507144118.6260-8-fiuczy@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-05-07_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=15 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-1805070150 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.43]); Mon, 07 May 2018 14:41:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 07 May 2018 14:41:35 +0000 (UTC) for IP:'148.163.156.1' DOMAIN:'mx0a-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'fiuczy@linux.ibm.com' RCPT:'' X-RedHat-Spam-Score: -0.701 (RCVD_IN_DNSWL_LOW, SPF_PASS) 148.163.156.1 mx0a-001b2d01.pphosted.com 148.163.156.1 mx0a-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: shalini@linux.vnet.ibm.com, cohuck@redhat.com Subject: [libvirt] [PATCH v2 7/8] docs: documentation for vfio-ccw passthrough 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 07 May 2018 14:47:14 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Shalini Chellathurai Saroja Signed-off-by: Shalini Chellathurai Saroja Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: John Ferlan --- docs/drvnodedev.html.in | 21 ++++++++++++++++++++- docs/formatdomain.html.in | 20 +++++++++++++++----- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/docs/drvnodedev.html.in b/docs/drvnodedev.html.in index 885904d..71a8a57 100644 --- a/docs/drvnodedev.html.in +++ b/docs/drvnodedev.html.in @@ -335,8 +335,27 @@ $ ls /sys/class/mdev_bus/<device>/mdev_supported_types =20

+ Before creating a mediated device, unbind the device from the respec= tive + device driver, eg. subchannel I/O driver for a CCW device. Then bind= the + device to the respective VFIO driver. For a CCW device, also unbind = the + corresponding subchannel of the CCW device from the subchannel I/O d= river + and then bind the subchannel (instead of the CCW device) to the vfio= _ccw + driver. The below example shows the unbinding and binding steps for = a CCW + device. +

+ +
+device=3D"0.0.1234"
+subchannel=3D"0.0.0123"
+echo $device > /sys/bus/ccw/devices/$device/driver/unbind
+echo $subchannel > /sys/bus/css/devices/$subchannel/driver/unbind
+echo $subchannel > /sys/bus/css/drivers/vfio_ccw/bind
+    
+ +

To manually instantiate a mediated device, use one of the following = as a - reference: + reference. For a CCW device, use the subchannel ID instead of the de= vice + ID.

=20
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index caeb14e..bcae85e 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4311,6 +4311,12 @@
       <address uuid=3D'c2177883-f1bb-47f0-914d-32a22e3a8804'/>
     </source>
     </hostdev>
+    <hostdev mode=3D'subsystem' type=3D'mdev' model=3D'vfio-ccw'>
+    <source>
+      <address uuid=3D'9063cba3-ecef-47b6-abcf-3fef4fdcad85'/>
+    </source>
+    <address type=3D'ccw' cssid=3D'0xfe' ssid=3D'0x0' devno=3D'0x0001'/=
>
+    </hostdev>
   </devices>
   ...
=20 @@ -4362,10 +4368,13 @@
For mediated devices (Since 3.2.0) the model attribute specifies the device API which determines how the host's vfio driver will expose the device to = the - guest. Currently, only model=3D'vfio-pci' is suppor= ted. - There are also some implications on the usage of guest's address= type - depending on the model attribute, see the - address element below.
+ guest. Currently, model=3D'vfio-pci' and + model=3D'vfio-ccw' (Since 4.4= .0) + is supported. Refer MDEV to= create + a mediated device on the host. There are also some implications = on the + usage of guest's address type depending on the model + attribute, see the address element below. +

Note: The managed attribute is only used with @@ -4497,7 +4506,8 @@ devices defining an allocation of resources on the physical parent d= evice, the address type used must conform to the model attribu= te of element hostdev, e.g. any address type other than PC= I for - vfio-pci device API will result in an error. + vfio-pci device API or any address type other than CCW = for + vfio-ccw device API will result in an error. See above for more details on the a= ddress element.

driver
--=20 2.9.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list