On 09/16/2013 03:07 PM, Daniel P. Berrange wrote:
> IME this kind of auto-magical fallback behaviour is a bad idea. If we
> want to support non-SHM files for the ivshmem device, then it should
> be done with an explicit command line property. eg where we currently
> have a 'size' and 'shm' property on the cli:
>
>    -device ivshmem,size=24124324,shm=nameofshmobj
>
> it could allow an alternative 'file' property to point to a pre-created
> filename
>
>    -device ivshmem,file=/some/file/path
This patch was based on the fact that in the glibc, shm_open() is
nothing more than an open() with /dev/shm/ prepended to the shared
memory object name. Hence, only a small modification was needed to
change this behavior.

Indeed, having different parameters to specify between a file and a
POSIX shared memory object should be clearer for the user experience.

I have reworked the patch and will send it asap.

Thanks,
-- 
Damien

Reply via email to