[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/25] configure: probe for memfd
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 01/25] configure: probe for memfd |
Date: |
Fri, 9 Oct 2015 00:16:28 +0300 |
From: Marc-André Lureau <address@hidden>
Check if memfd_create() is part of system libc.
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
configure | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/configure b/configure
index 2d2a498..a68863c 100755
--- a/configure
+++ b/configure
@@ -3486,6 +3486,22 @@ if compile_prog "" "" ; then
eventfd=yes
fi
+# check if memfd is supported
+memfd=no
+cat > $TMPC << EOF
+#include <sys/memfd.h>
+
+int main(void)
+{
+ return memfd_create("foo", MFD_ALLOW_SEALING);
+}
+EOF
+if compile_prog "" "" ; then
+ memfd=yes
+fi
+
+
+
# check for fallocate
fallocate=no
cat > $TMPC << EOF
@@ -4857,6 +4873,9 @@ fi
if test "$eventfd" = "yes" ; then
echo "CONFIG_EVENTFD=y" >> $config_host_mak
fi
+if test "$memfd" = "yes" ; then
+ echo "CONFIG_MEMFD=y" >> $config_host_mak
+fi
if test "$fallocate" = "yes" ; then
echo "CONFIG_FALLOCATE=y" >> $config_host_mak
fi
--
MST
- [Qemu-devel] [PULL 00/25] virtio,pc features, fixes, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 01/25] configure: probe for memfd,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 04/25] util: add memfd helpers, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 05/25] util: add fallback for qemu_memfd_alloc(), Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 06/25] vhost: document log resizing, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 07/25] vhost: add vhost_set_log_base op, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 03/25] util: add linux-only memfd fallback, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 09/25] vhost: alloc shareable log, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 10/25] vhost-user: send log shm fd along with log_base, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 13/25] vhost-user: document migration log, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 14/25] net: add trace_vhost_user_event, Michael S. Tsirkin, 2015/10/08
- [Qemu-devel] [PULL 15/25] vhost user: add support of live migration, Michael S. Tsirkin, 2015/10/08