docs: refactor mdev_types into new paragraph

To prevent copying the mdev_types description multiple times
it is refactored into a new paragraph for easy reuse.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Boris Fiuczynski 2020-11-11 13:45:20 +01:00 committed by Erik Skultety
parent 8caa8c994f
commit 23df990ce4
2 changed files with 41 additions and 30 deletions

View File

@ -144,7 +144,7 @@
types on the physical device, along with the type attributes available
through sysfs. A detailed description of the XML format for the
<code>mdev_types</code> capability can be found
<a href="formatnode.html#MDEVCap">here</a>.
<a href="formatnode.html#MDEVTypesCap">here</a>.
</p>
<p>
The following example shows how we might represent an NVIDIA GPU device

View File

@ -159,35 +159,10 @@
</dd>
<dt><code><a id="MDEVCap">mdev_types</a></code></dt>
<dd>
This device is capable of creating mediated devices, and
the capability will contain a list of <code>type</code>
elements, which list all mdev types supported on the
physical device. <span class="since">Since 3.4.0</span>
Each <code>type</code> element has a single <code>id</code>
attribute that holds an official vendor-supplied identifier
for the type. It supports the following sub-elements:
<dl>
<dt><code>name</code></dt>
<dd>
The <code>name</code> element holds a vendor-supplied
code name for the given mediated device type. This is
an optional element.
</dd>
<dt><code>deviceAPI</code></dt>
<dd>
The value of this element describes how an instance of
the given type will be presented to the guest by the
VFIO framework.
</dd>
<dt><code>availableInstances</code></dt>
<dd>
This element reports the current state of resource
allocation. In other words, how many instances of the
given type can still be successfully created on the
physical device.
</dd>
</dl>
</dd>
This device is capable of creating mediated devices.
The sub-elements are summarized in
<a href="#MDEVTypesCap">mdev_types capability</a>.
</dd>
</dl>
</dd>
@ -445,6 +420,42 @@
</dd>
</dl>
<h3><a id="MDEVTypesCap">mdev_types capability</a></h3>
<p>
<a href="#MDEVCap">PCI</a> devices can be capable of
creating mediated devices. If they indeed are capable,
then the parent <code>capability</code> element for
<code>mdev_types</code> type will contain a list of
<code>type</code> elements, which list all mdev types supported
on the physical device. <span class="since">Since 3.4.0</span>
Each <code>type</code> element has a single <code>id</code>
attribute that holds an official vendor-supplied identifier
for the type. It supports the following sub-elements:
<dl>
<dt><code>name</code></dt>
<dd>
The <code>name</code> element holds a vendor-supplied
code name for the given mediated device type. This is
an optional element.
</dd>
<dt><code>deviceAPI</code></dt>
<dd>
The value of this element describes how an instance of
the given type will be presented to the guest by the
VFIO framework.
</dd>
<dt><code>availableInstances</code></dt>
<dd>
This element reports the current state of resource
allocation. In other words, how many instances of the
given type can still be successfully created on the
physical device.
</dd>
</dl>
</p>
<h2><a id="nodeExample">Examples</a></h2>
<p>The following are some example node device XML outputs:</p>