summaryrefslogtreecommitdiffstats
path: root/include/qemu
diff options
context:
space:
mode:
authorJagannathan Raman2021-01-29 17:46:04 +0100
committerStefan Hajnoczi2021-02-09 21:53:56 +0100
commit44a4ff31c01082ffce08ec3b9a87a4fdf15919d5 (patch)
tree12d221ae0ba47bf3a853248b3b42bae208a07c6b /include/qemu
parentmulti-process: add configure and usage information (diff)
downloadqemu-44a4ff31c01082ffce08ec3b9a87a4fdf15919d5.tar.gz
qemu-44a4ff31c01082ffce08ec3b9a87a4fdf15919d5.tar.xz
qemu-44a4ff31c01082ffce08ec3b9a87a4fdf15919d5.zip
memory: alloc RAM from file at offset
Allow RAM MemoryRegion to be created from an offset in a file, instead of allocating at offset of 0 by default. This is needed to synchronize RAM between QEMU & remote process. Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John G Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 609996697ad8617e3b01df38accc5c208c24d74e.1611938319.git.jag.raman@oracle.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/mmap-alloc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/qemu/mmap-alloc.h b/include/qemu/mmap-alloc.h
index 8b7a5c70f3..456ff87df1 100644
--- a/include/qemu/mmap-alloc.h
+++ b/include/qemu/mmap-alloc.h
@@ -17,6 +17,7 @@ size_t qemu_mempath_getpagesize(const char *mem_path);
* @readonly: true for a read-only mapping, false for read/write.
* @shared: map has RAM_SHARED flag.
* @is_pmem: map has RAM_PMEM flag.
+ * @map_offset: map starts at offset of map_offset from the start of fd
*
* Return:
* On success, return a pointer to the mapped area.
@@ -27,7 +28,8 @@ void *qemu_ram_mmap(int fd,
size_t align,
bool readonly,
bool shared,
- bool is_pmem);
+ bool is_pmem,
+ off_t map_offset);
void qemu_ram_munmap(int fd, void *ptr, size_t size);