summary refs log tree commit diff stats
path: root/include/exec/ram_addr.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-06-02 18:12:23 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2017-06-15 11:04:04 +0200
commit38b3362dd15c2dc4ad0edd105cde914e639d90fa (patch)
tree27b83a948ae958aa6731a99eb6520b15f9e61228 /include/exec/ram_addr.h
parent8d37b030fe14917a95118db04ed898c1cd2c8f49 (diff)
downloadfocaccia-qemu-38b3362dd15c2dc4ad0edd105cde914e639d90fa.tar.gz
focaccia-qemu-38b3362dd15c2dc4ad0edd105cde914e639d90fa.zip
exec: split qemu_ram_alloc_from_file()
Add qemu_ram_alloc_from_fd(), which can be use to allocate ramblock from
fd only.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170602141229.15326-4-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec/ram_addr.h')
-rw-r--r--include/exec/ram_addr.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 140efa840c..73d1bea8b6 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -65,6 +65,9 @@ unsigned long last_ram_page(void);
 RAMBlock *qemu_ram_alloc_from_file(ram_addr_t size, MemoryRegion *mr,
                                    bool share, const char *mem_path,
                                    Error **errp);
+RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr,
+                                 bool share, int fd,
+                                 Error **errp);
 RAMBlock *qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
                                   MemoryRegion *mr, Error **errp);
 RAMBlock *qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr, Error **errp);