On 02/22/13 19:20, Eric Blake wrote:
On 02/21/2013 07:47 AM, Peter Krempa wrote:
> This patch documents XML elements used for (basic) support of virtual
> RNG devices.
>
> In the devices section in the domain XML users may specify:
>
> For the default 'random' backend:
> <devices>
> <rng model='virtio'>
> <backend model='random'>/dev/urandom</backend>
> </rng>
> </devices>
>
> For the slightly more advanced EGD backend:
> <devices>
> <rng model='virtio'>
> <backend model='egd' type='udp'>
> <!-- this is a definition of a character device -->
> <source mode='bind' service='1234'/>
> <source mode='connect' host='1.2.3.4'
service='1234'/>
> <!-- or other valid character device configuration -->
You don't really allow two <source>; maybe a better layout would be a
strategic comment, such as:
<backend model='egd' type='udp'>
<!-- this is a definition of a character device -->
<source mode='bind' service='1234'/>
<!-- or other valid character device configuration, such as
<source mode='connect' host='1.2.3.4'
service='1234'/>
-->
> </backend>
> </rng>
> </devices>
>
> For the planned random daemon/pool:
> <devices>
> <rng model='virtio'>
> <backend model='pool'
pool='poolname'>class</backend>
Missing </rng>
> </devices>
>
> to enable the RNG device for guests.
> ---
>
> Notes:
> Version 2:
> - ACKed, no change, unfortunately doesn't make sense to push alone
Still some nits to fix before pushing:
>
> +<pre>
> + ...
> + <devices>
> + <rng model='virtio'>
> + <backend
model='random'>/dev/random</backend>
> + <!-- OR -->
> + <backend model='egd' type='udp'>
> + <source mode='bind' service='1234'>
> + <source mode='connect' host='1.2.3.4'
service='1234'>
> + </backend>
> + </rng>
> + </devices>
> + ...
Do we really want two <source> in a single <backend> in the example, or
would it be easier to show multiple <rng> devices, one for each type of
backend?
That actually is valid for the character device backends. The UDP
backend has to use two separate sources for bi-directional
communication. The definition of that source type is declared as a type
in our RNG schema an I merely reused that.
> + <dd>
> + <p>
> + The <code>backend</code> element specifies the source of
entropy
> + to be used for the doimain. The source model is configured using the
s/doimain/domain/
> + <code>model</code> attribute. Supported source models are:
> + </p>
> + <ul>
> + <li>'random' — /dev/random (default) or similar
device as source</li>
> + <li>'egd' — a EGD protocol backend. </li>
not consistent on whether your <li> end with '.'
Peter