Signed-off-by: Shalini Chellathurai Saroja <shalini(a)linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk(a)linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
---
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 885904d67d..71a8a57b0c 100644
--- a/docs/drvnodedev.html.in
+++ b/docs/drvnodedev.html.in
@@ -335,8 +335,27 @@
$ ls /sys/class/mdev_bus/<device>/mdev_supported_types</pre>
<p>
+ Before creating a mediated device, unbind the device from the respective
+ 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 driver
+ 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.
+ </p>
+
+ <pre>
+device="0.0.1234"
+subchannel="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
+ </pre>
+
+ <p>
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 device
+ ID.
</p>
<pre>
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 5e99884dc5..ff8ec25928 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4308,6 +4308,12 @@
<address uuid='c2177883-f1bb-47f0-914d-32a22e3a8804'/>
</source>
</hostdev>
+ <hostdev mode='subsystem' type='mdev'
model='vfio-ccw'>
+ <source>
+ <address uuid='9063cba3-ecef-47b6-abcf-3fef4fdcad85'/>
+ </source>
+ <address type='ccw' cssid='0xfe' ssid='0x0'
devno='0x0001'/>
+ </hostdev>
</devices>
...</pre>
@@ -4359,10 +4365,13 @@
<dd>For mediated devices (<span class="since">Since
3.2.0</span>)
the <code>model</code> attribute specifies the device API which
determines how the host's vfio driver will expose the device to the
- guest. Currently, only <code>model='vfio-pci'</code> is
supported.
- There are also some implications on the usage of guest's address type
- depending on the <code>model</code> attribute, see the
- <code>address</code> element below.</dd>
+ guest. Currently, <code>model='vfio-pci'</code> and
+ <code>model='vfio-ccw'</code> (<span
class="since">Since 4.3.0</span>)
+ is supported. Refer <a
href="drvnodedev.html#MDEV">MDEV</a> to create
+ a mediated device on the host. There are also some implications on the
+ usage of guest's address type depending on the
<code>model</code>
+ attribute, see the <code>address</code> element below.
+ </dd>
</dl>
<p>
Note: The <code>managed</code> attribute is only used with
@@ -4488,7 +4497,8 @@
devices defining an allocation of resources on the physical parent device,
the address type used must conform to the <code>model</code> attribute
of element <code>hostdev</code>, e.g. any address type other than PCI
for
- <code>vfio-pci</code> device API will result in an error.
+ <code>vfio-pci</code> device API or any address type other than CCW
for
+ <code>vfio-ccw</code> device API will result in an error.
<a href="#elementsAddress">See above</a> for more details on
the address
element.</dd>
<dt><code>driver</code></dt>
--
2.13.4