mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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 <scw@google.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20190819180947.180725-1-scw@google.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
7f4341e84b
commit
9bdfa4d23f
3 changed files with 17 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue