]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: documentation for vfio-ccw passthrough
authorShalini Chellathurai Saroja <shalini@linux.vnet.ibm.com>
Mon, 7 May 2018 14:41:17 +0000 (16:41 +0200)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 14 May 2018 16:27:47 +0000 (12:27 -0400)
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>
docs/drvnodedev.html.in
docs/formatdomain.html.in

index 885904d67d57574315c5e198c9165f1182c29d28..71a8a57b0c285c2f6636beaa2365c34e1976c47a 100644 (file)
     <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>
index 80172c18d0c25ee94fe4c46bb7943f8d1f32c6c6..63665906abb231dbc10bc6420fa43e4ab640a52e 100644 (file)
       &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>
 
           <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
       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>