qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 30/39] contrib: add ivshmem client and server


From: Andrew Jones
Subject: Re: [Qemu-devel] [PATCH 30/39] contrib: add ivshmem client and server
Date: Fri, 26 Jun 2015 18:25:56 +0200
User-agent: Mutt/1.5.23.1 (2014-03-12)

On Fri, Jun 26, 2015 at 04:49:36PM +0200, Marc-André Lureau wrote:
> From: David Marchand <address@hidden>
> 
> When using ivshmem devices, notifications between guests can be sent as
> interrupts using a ivshmem-server (typical use described in documentation).
> The client is provided as a debug tool.
> 
> Signed-off-by: Olivier Matz <address@hidden>
> Signed-off-by: David Marchand <address@hidden>
> Signed-off-by: Marc-André Lureau <address@hidden>
> [fix a valgrind warning and a server_close() segv, add server headers]
> ---
>  Makefile                                |   8 +
>  configure                               |   3 +
>  contrib/ivshmem-client/ivshmem-client.c | 433 
> ++++++++++++++++++++++++++++++++
>  contrib/ivshmem-client/ivshmem-client.h | 212 ++++++++++++++++
>  contrib/ivshmem-client/main.c           | 239 ++++++++++++++++++
>  contrib/ivshmem-server/ivshmem-server.c | 422 +++++++++++++++++++++++++++++++
>  contrib/ivshmem-server/ivshmem-server.h | 164 ++++++++++++
>  contrib/ivshmem-server/main.c           | 264 +++++++++++++++++++
>  qemu-doc.texi                           |  10 +-
>  9 files changed, 1752 insertions(+), 3 deletions(-)
>  create mode 100644 contrib/ivshmem-client/ivshmem-client.c
>  create mode 100644 contrib/ivshmem-client/ivshmem-client.h
>  create mode 100644 contrib/ivshmem-client/main.c
>  create mode 100644 contrib/ivshmem-server/ivshmem-server.c
>  create mode 100644 contrib/ivshmem-server/ivshmem-server.h
>  create mode 100644 contrib/ivshmem-server/main.c
>

(snip everything...)

> +
> +/**
> + * Initialize an ivshmem server
> + *
> + * @server:         A pointer to an uninitialized IvshmemServer structure
> + * @unix_sock_path: The pointer to the unix socket file name
> + * @shm_path:       Path to the shared memory. The path corresponds to a 
> POSIX
> + *                  shm name. To use a real file, for instance in a 
> hugetlbfs,
> + *                  it is possible to use /../../abspath/to/file.

This is only true with glibc < 2.19,
see glibc commit b20de2c3d9d751eb259c321426188eefc64fcbe9, "Properly
handle shm_open validation. Fixes bug 16274."

(This probably isn't the right place to bring this up, but...)

Would it make sense to turn ivshmem into a frontend for the hostmem
backend? If we do that, then we can use hugetlbfs backed memory, and
possibly get other benefits as well, right?

Thanks,
drew



reply via email to

[Prev in Thread] Current Thread [Next in Thread]