[libvirt] [PATCH v1 1/6] doc: schema: Add documentation for the shmem support

Martin Kletzander mkletzan at redhat.com
Tue Aug 26 06:22:52 UTC 2014


On Fri, Aug 22, 2014 at 12:47:00PM +0200, Maxime Leroy wrote:
>This patch documents XML elements used for support of shmem
>devices.
>
>Considering there could be other shared memory related devices,
>this patch introduces a general device model, called shmem device.
>Currenly "ivshmem" is the only shared memory model supported.
>

Automatically adding model='ivshmem' takes away the generality gained
by renaming the device.  Especially if it is the only model supported
we don't have to put "model" in there.  If we expand this to another
device/hypervisor, we then might separate the setting by a model and
automatically add model='ivshmem', but we might keep it the same if
the options will compatible.  Until then the model specification just
adds unnecessary code.

>About ivshmem, please see the following documentation:
>http://git.qemu.org/?p=qemu.git;a=blob;f=docs/specs/ivshmem_device_spec.txt
>(Ivshmem documentation for qemu will be updated soon:
>http://lists.gnu.org/archive/html/qemu-devel/2014-08/msg01244.html)
>
>In the devices section in the domain XML users may specify:
>
>- For ivshmem device using an ivshmem server:
>
> <shmem name='shmem0' model='ivshmem'>
>   <source file='/tmp/socket-ivshmem0'/>
>   <size unit='M'>32</size>
>   <msi vectors='32' ioeventfd='on'/>
> </shmem>

From the documentation you've linked I understand it that either the
ivshmem has a name *or* it uses a server; and then it doesn't need a
name because the server sends an FD to the shared memory using
SCM_RIGHTS.

If I'm right, documentation and parsing should reflect that.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140826/5916e0d3/attachment-0001.sig>


More information about the libvir-list mailing list