[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



On Tue, Aug 26, 2014 at 8:22 AM, Martin Kletzander <mkletzan redhat com> wrote:
> On Fri, Aug 22, 2014 at 12:47:00PM +0200, Maxime Leroy wrote:
>>
[..]
>> 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.

Model is an optional attribute. You can still use this xml: <shmem name="asdf"/>

> 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.
>

It's the same concept from this first implementation of ivshmem:
https://www.redhat.com/archives/libvir-list/2012-November/msg00341.html

Having a model attribute allow to split properly the code specific to
a generic shared memory concept and the code specific to ivshmem.

There are pros and cons to have or not a model attribute.

Anyway, let keep the code simple by removing the model attribute.

>> 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.

The name is not needed if libvirt doesn't start the ivshmem server. In
this case, it could be optional.

Maxime


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]