From 9bdfa4d23f4395dab89a60eb6b05a0308792bd66 Mon Sep 17 00:00:00 2001 From: Shu-Chun Weng Date: Mon, 19 Aug 2019 11:09:47 -0700 Subject: linux-user: add memfd_create Add support for the memfd_create syscall. If the host does not have the libc wrapper, translate to a direct syscall with NC-macro. Buglink: https://bugs.launchpad.net/qemu/+bug/1734792 Signed-off-by: Shu-Chun Weng Reviewed-by: Laurent Vivier Message-Id: <20190819180947.180725-1-scw@google.com> Signed-off-by: Laurent Vivier --- include/qemu/memfd.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/qemu/memfd.h b/include/qemu/memfd.h index d551c28b68..975b6bdb77 100644 --- a/include/qemu/memfd.h +++ b/include/qemu/memfd.h @@ -32,6 +32,10 @@ #define MFD_HUGE_SHIFT 26 #endif +#if defined CONFIG_LINUX && !defined CONFIG_MEMFD +int memfd_create(const char *name, unsigned int flags); +#endif + int qemu_memfd_create(const char *name, size_t size, bool hugetlb, uint64_t hugetlbsize, unsigned int seals, Error **errp); bool qemu_memfd_alloc_check(void); -- cgit v1.2.3-55-g7522