docs: documentation for vfio-ccw passthrough

Signed-off-by: Shalini Chellathurai Saroja <shalini@linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Shalini Chellathurai Saroja 2018-05-07 16:41:17 +02:00 committed by John Ferlan
parent 21442874cf
commit 9c0981ea2e
2 changed files with 35 additions and 6 deletions

View File

@ -334,9 +334,28 @@
<pre>
$ ls /sys/class/mdev_bus/&lt;device&gt;/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 &gt; /sys/bus/ccw/devices/$device/driver/unbind
echo $subchannel &gt; /sys/bus/css/devices/$subchannel/driver/unbind
echo $subchannel &gt; /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>

View File

@ -4350,6 +4350,12 @@
&lt;address uuid='c2177883-f1bb-47f0-914d-32a22e3a8804'/&gt;
&lt;/source&gt;
&lt;/hostdev&gt;
&lt;hostdev mode='subsystem' type='mdev' model='vfio-ccw'&gt;
&lt;source&gt;
&lt;address uuid='9063cba3-ecef-47b6-abcf-3fef4fdcad85'/&gt;
&lt;/source&gt;
&lt;address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/&gt;
&lt;/hostdev&gt;
&lt;/devices&gt;
...</pre>
@ -4401,10 +4407,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.4.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
@ -4536,7 +4545,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>