From f7a199b2b4486242271f769bb4bc2638c0413274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 24 Sep 2015 12:55:01 +0200 Subject: ivshmem: use little-endian int64_t for the protocol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current ivshmem protocol uses 'long' for integers. But the sizeof(long) depends on the host and the endianess is not defined, which may cause portability troubles. Instead, switch to using little-endian int64_t. This breaks the protocol, except on x64 little-endian host where this change should be compatible. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- docs/specs/ivshmem_device_spec.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/specs/ivshmem_device_spec.txt b/docs/specs/ivshmem_device_spec.txt index 3435116b37..d318d65c32 100644 --- a/docs/specs/ivshmem_device_spec.txt +++ b/docs/specs/ivshmem_device_spec.txt @@ -61,7 +61,7 @@ This server code is available in qemu.git/contrib/ivshmem-server. The server must be started on the host before any guest. It creates a shared memory object then waits for clients to connect on a unix -socket. +socket. All the messages are little-endian int64_t integer. For each client (QEMU process) that connects to the server: - the server sends a protocol version, if client does not support it, the client -- cgit v1.2.1