mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
docs, conf, schema: add support for shmem device
This patch adds parsing/formatting code as well as documentation for shared memory devices. This will currently be only accessible in QEMU using it's ivshmem device, but is designed as generic as possible to allow future expansion for other hypervisors. In the devices section in the domain XML users may specify: - For shmem device using a server: <shmem name='shmem0'> <server path='/tmp/socket-ivshmem0'/> <size unit='M'>32</size> <msi vectors='32' ioeventfd='on'/> </shmem> - For ivshmem device not using an ivshmem server: <shmem name='shmem1'> <size unit='M'>32</size> </shmem> Most of the configuration is made optional so it also allows specifications like: <shmem name='shmem1/> <shmem name='shmem2'> <server/> </shmem> Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com> Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
@@ -5582,6 +5582,58 @@ qemu-kvm -net nic,model=? /dev/null
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4><a name="elementsShmem">Shared memory device</a></h4>
|
||||
|
||||
<p>
|
||||
A shared memory device allows to share a memory region between
|
||||
different virtual machines and the host.
|
||||
<span class="since">Since 1.2.9, QEMU and KVM only</span>
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
...
|
||||
<devices>
|
||||
<shmem name='my_shmem0'>
|
||||
<size unit='M'>4</size>
|
||||
</shmem>
|
||||
<shmem name='shmem_server'>
|
||||
<size unit='M'>2</size>
|
||||
<server path='/tmp/socket-shmem'/>
|
||||
<msi vectors='32' ioeventfd='on'/>
|
||||
</shmem>
|
||||
</devices>
|
||||
...
|
||||
</pre>
|
||||
|
||||
<dl>
|
||||
<dt><code>shmem</code></dt>
|
||||
<dd>
|
||||
The <code>shmem</code> element has one mandatory attribute,
|
||||
<code>name</code> to identify the shared memory.
|
||||
</dd>
|
||||
<dt><code>size</code></dt>
|
||||
<dd>
|
||||
The optional <code>size</code> element specifies the size of the shared
|
||||
memory. This must be power of 2 and greater than or equal to 1 MiB.
|
||||
</dd>
|
||||
<dt><code>server</code></dt>
|
||||
<dd>
|
||||
The optional <code>server</code> element can be used to configure a server
|
||||
socket the device is supposed to connect to. The optional
|
||||
<code>path</code> attribute specifies the path to the unix socket and
|
||||
defaults to <code>/var/lib/libvirt/shmem/$shmem-$name-sock</code>.
|
||||
</dd>
|
||||
<dt><code>msi</code></dt>
|
||||
<dd>
|
||||
The optional <code>msi</code> element enables/disables (values "on"/"off",
|
||||
respectively) MSI interrupts. This option can currently be used only
|
||||
together with the <code>server</code> element. The <code>vectors</code>
|
||||
attribute can be used to specify the number of interrupt
|
||||
vectors. The <code>ioeventd</code> attribute enables/disables (values
|
||||
"on"/"off", respectively) ioeventfd.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h3><a name="seclabel">Security label</a></h3>
|
||||
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user