qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v4 08/12] libvhost-user: enable it on any POSIX system


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v4 08/12] libvhost-user: enable it on any POSIX system
Date: Wed, 8 May 2024 12:36:30 +0200
User-agent: Mozilla Thunderbird

On 8/5/24 09:44, Stefano Garzarella wrote:
The vhost-user protocol is not really Linux-specific so let's enable
libvhost-user for any POSIX system.

Compiling it on macOS and FreeBSD some problems came up:
- avoid to include linux/vhost.h which is avaibale only on Linux

"available"

   (vhost_types.h contains many of the things we need)
- macOS doesn't provide sys/endian.h, so let's define them
   (note: libvhost-user doesn't include qemu's headers, so we can't use

"QEMU"

    use "qemu/bswap.h")
- define eventfd_[write|read] as write/read wrapper when system doesn't
   provide those (e.g. macOS)
- copy SEAL defines from include/qemu/memfd.h to make the code works
   on FreeBSD where MFD_ALLOW_SEALING is defined

Alternatively add in subprojects/libvhost-user/include/osdep.h.

- define MAP_NORESERVE if it's not defined (e.g. on FreeBSD)

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
---
  meson.build                               |  2 +-
  subprojects/libvhost-user/libvhost-user.h |  2 +-
  subprojects/libvhost-user/libvhost-user.c | 60 +++++++++++++++++++++--
  3 files changed, 59 insertions(+), 5 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>





reply via email to

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