From 229dcc73e84577aa98bc573e3f31b3aed47b30b7 Mon Sep 17 00:00:00 2001 From: Erik Skultety Date: Fri, 3 Feb 2017 11:02:07 +0100 Subject: [PATCH] docs: Document the new hostdev type 'mdev' Signed-off-by: Erik Skultety --- docs/formatdomain.html.in | 46 ++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 4a3123e989..f671838e15 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -3884,6 +3884,19 @@ <source protocol='vhost' wwpn='naa.50014057667280d8'/> </hostdev> </devices> + ... + +

or:

+ +
+  ...
+  <devices>
+    <hostdev mode='subsystem' type='mdev' model='vfio-pci'>
+    <source>
+      <address uuid='c2177883-f1bb-47f0-914d-32a22e3a8804'>
+    </source>
+    </hostdev>
+  </devices>
   ...
@@ -3930,12 +3943,22 @@ type passes all LUNs presented by a single HBA to the guest. +
mdev
+
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='vfio-pci' is supported. + 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 PCI devices - and is ignored by all the other device types, thus setting - managed explicitly with other than PCI device has the same - effect as omitting it. + Note: The managed attribute is only used with + type='pci' and is ignored by all the other device types, + thus setting managed explicitly with other than a PCI + device has the same effect as omitting it. Similarly, + model attribute is only supported by mediated devices and + ignored by all other device types.

source
@@ -4000,6 +4023,12 @@ is the vhost_scsi wwpn (16 hexadecimal digits with a prefix of "naa.") established in the host configfs. +
mdev
+
Mediated devices (Since 3.2.0) are + described by the address element. The + address element contains a single mandatory attribute + uuid. +
vendor, product
@@ -4043,8 +4072,13 @@ For PCI devices the element carries 4 attributes allowing to designate the device as can be found with the lspci or with virsh nodedev-list. For SCSI devices a 'drive' - address type must be used. See above for - more details on the address element. + address type must be used. For mediated devices, which are software-only + devices defining an allocation of resources on the physical parent device, + the address type used must conform to the model attribute + of element hostdev, e.g. any address type other than PCI for + vfio-pci device API will result in an error. + See above for more details on the address + element.
driver
PCI devices can have an optional driver