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 /hw | |
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 'hw')
-rw-r--r-- | hw/misc/ivshmem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 0505b52c98..603e992a7f 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -495,7 +495,8 @@ static void process_msg_shmem(IVShmemState *s, int fd, Error **errp) /* mmap the region and map into the BAR2 */ memory_region_init_ram_from_fd(&s->server_bar2, OBJECT(s), - "ivshmem.bar2", size, true, fd, &local_err); + "ivshmem.bar2", size, true, fd, 0, + &local_err); if (local_err) { error_propagate(errp, local_err); return; |