On Wed, Jan 11, 2017 at 04:28:23PM +0800, Longpeng(Mike) wrote:
This patch documents XML elements used for support of virtual
crypto devices.
In the devices section in the domain XML users may specify:
<crypto model='virtio'>
<backend type='builtin' queues='1'/>
</crypto>
to enable the crypto device for guests.
Signed-off-by: Longpeng(Mike) <longpeng2(a)huawei.com>
---
docs/formatdomain.html.in | 60 +++++++++++++++++++++++++++++++++++++++++++
docs/schemas/domaincommon.rng | 27 +++++++++++++++++++
2 files changed, 87 insertions(+)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 39f5a88..1ad666c 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -7081,6 +7081,66 @@ qemu-kvm -net nic,model=? /dev/null
</dd>
</dl>
+ <h4><a name="elementCrypto">Crypto device</a></h4>
+
+ <p>
+ The virtual crypto device is a kind of virtual hardware for
+ virtual machines and it can be added to the guest via the
+ <code>crypto</code> element.
"kind of a virtual hardware" doesn't tell me anything about it.
+ <span class="since">Since 3.0.0, QEMU and KVM
only</span>
+ </p>
+
+ <p>
+ Example: usage of the Crypto device:
+ </p>
+<pre>
+ ...
+ <devices>
+ <crypto model='virtio'>
+ <backend type='builtin' queues='1'/>
+ </crypto>
+ </devices>
+ ...
+</pre>
+ <dl>
+ <dt><code>model</code></dt>
+ <dd>
+ <p>
+ The required <code>model</code> attribute specifies what
+ type of crypto device is provide. Currently the valid values
+ are:
+ </p>
+ <ul>
+ <li>'virtio' — needs virtio-crypto guest
driver</li>
list of values with one item, just throw away the list and jspecify it
inline.
+ </ul>
+ </dd>
+ <dt><code>backend</code></dt>
+ <dd>
+ <p>
+ The <code>backend</code> element specifies the type and
+ number of queues of the crypto device to be used for the
+ domain.
+ </p>
+ <dl>
+ <dt><code>type</code></dt>
+ <dd>
+ <p>
+ The required <code>type</code> element specifies the
+ type of the crypto device.
What types are possible? Only builtin? That should be specified here.
Also "builtin" is very non-descriptive.
+ </p>
+ </dd>
+ <dt><code>queues</code></dt>
+ <dd>
+ <p>
+ The optional <code>queues</code> element specifies the
+ number of queues of the crypto device, the default number
+ of queues is 1.
+ </p>
+ </dd>
+ </dl>
+ </dd>
+ </dl>
+
<h3><a name="seclabel">Security label</a></h3>
<p>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index be0a609..0878245 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -4320,6 +4320,7 @@
<ref name="tpm"/>
<ref name="shmem"/>
<ref name="memorydev"/>
+ <ref name="crypto"/>
</choice>
</zeroOrMore>
<optional>
@@ -4804,6 +4805,32 @@
</element>
</define>
+ <define name="crypto">
+ <element name="crypto">
+ <attribute name="model">
+ <choice>
+ <value>virtio</value>
+ </choice>
+ </attribute>
+ <ref name="crypto-backend"/>
+ </element>
+ </define>
+
+ <define name="crypto-backend">
+ <element name="backend">
+ <attribute name="type">
+ <choice>
+ <value>builtin</value>
+ </choice>
+ </attribute>
+ <optional>
+ <attribute name="queues">
+ <ref name="positiveInteger"/>
+ </attribute>
+ </optional>
+ </element>
+ </define>
+
<define name="usbmaster">
<element name="master">
<attribute name="startport">
--
1.8.3.1
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list