aboutsummaryrefslogtreecommitdiff
path: root/include/qemu
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-10-23 15:18:07 +0100
committerEduardo Habkost <ehabkost@redhat.com>2018-01-19 11:18:51 -0200
commitdcff1035dfdfb4c76634df64a5359ac18749f7ca (patch)
tree719e554270c95335c019003d20c64047cd68a61f /include/qemu
parent3e5bdc6573edf0585e4085e6a4e349b135abf3b4 (diff)
downloadqemu-dcff1035dfdfb4c76634df64a5359ac18749f7ca.zip
qemu-dcff1035dfdfb4c76634df64a5359ac18749f7ca.tar.gz
qemu-dcff1035dfdfb4c76634df64a5359ac18749f7ca.tar.bz2
memfd: split qemu_memfd_alloc()
Add a function to only create a memfd, without mmap. The function is used in the following memory backend. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20171023141815.17709-2-marcandre.lureau@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/memfd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/memfd.h b/include/qemu/memfd.h
index 745a8c5..41c24d8 100644
--- a/include/qemu/memfd.h
+++ b/include/qemu/memfd.h
@@ -16,6 +16,7 @@
#define F_SEAL_WRITE 0x0008 /* prevent writes */
#endif
+int qemu_memfd_create(const char *name, size_t size, unsigned int seals);
void *qemu_memfd_alloc(const char *name, size_t size, unsigned int seals,
int *fd);
void qemu_memfd_free(void *ptr, size_t size, int fd);