diff options
author | Jagannathan Raman <jag.raman@oracle.com> | 2021-01-29 11:46:04 -0500 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2021-02-09 20:53:56 +0000 |
commit | 44a4ff31c01082ffce08ec3b9a87a4fdf15919d5 (patch) | |
tree | 12d221ae0ba47bf3a853248b3b42bae208a07c6b /include/exec/memory.h | |
parent | 639090d85057e7e8251e2509fa136f1a2384f131 (diff) |
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/exec/memory.h')
-rw-r--r-- | include/exec/memory.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h index ed292767cd..c6fb714e49 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -998,6 +998,7 @@ void memory_region_init_ram_from_file(MemoryRegion *mr, * @size: size of the region. * @share: %true if memory must be mmaped with the MAP_SHARED flag * @fd: the fd to mmap. + * @offset: offset within the file referenced by fd * @errp: pointer to Error*, to store an error if it happens. * * Note that this function does not do anything to cause the data in the @@ -1009,6 +1010,7 @@ void memory_region_init_ram_from_fd(MemoryRegion *mr, uint64_t size, bool share, int fd, + ram_addr_t offset, Error **errp); #endif |