diff options
| author | Alexander Graf <graf@amazon.com> | 2023-04-03 22:14:21 +0000 |
|---|---|---|
| committer | David Hildenbrand <david@redhat.com> | 2023-05-23 16:47:03 +0200 |
| commit | 4b870dc4d0c0895859d34d14ce0272a4bcbccf78 (patch) | |
| tree | 8af35d1db6ba0cd63419627870a0a75aec9bf150 /qemu-options.hx | |
| parent | 886c0453cbf10eebd42a9ccf89c3e46eb389c357 (diff) | |
| download | focaccia-qemu-4b870dc4d0c0895859d34d14ce0272a4bcbccf78.tar.gz focaccia-qemu-4b870dc4d0c0895859d34d14ce0272a4bcbccf78.zip | |
hostmem-file: add offset option
Add an option for hostmem-file to start the memory object at an offset into the target file. This is useful if multiple memory objects reside inside the same target file, such as a device node. In particular, it's useful to map guest memory directly into /dev/mem for experimentation. To make this work consistently, also fix up all places in QEMU that expect fd offsets to be 0. Signed-off-by: Alexander Graf <graf@amazon.com> Message-Id: <20230403221421.60877-1-graf@amazon.com> Acked-by: Markus Armbruster <armbru@redhat.com> Acked-by: Peter Xu <peterx@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'qemu-options.hx')
| -rw-r--r-- | qemu-options.hx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qemu-options.hx b/qemu-options.hx index e4566149ee..b37eb9662b 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4949,7 +4949,7 @@ SRST they are specified. Note that the 'id' property must be set. These objects are placed in the '/objects' path. - ``-object memory-backend-file,id=id,size=size,mem-path=dir,share=on|off,discard-data=on|off,merge=on|off,dump=on|off,prealloc=on|off,host-nodes=host-nodes,policy=default|preferred|bind|interleave,align=align,readonly=on|off`` + ``-object memory-backend-file,id=id,size=size,mem-path=dir,share=on|off,discard-data=on|off,merge=on|off,dump=on|off,prealloc=on|off,host-nodes=host-nodes,policy=default|preferred|bind|interleave,align=align,offset=offset,readonly=on|off`` Creates a memory file backend object, which can be used to back the guest RAM with huge pages. @@ -5019,6 +5019,10 @@ SRST such cases, users can specify the required alignment via this option. + The ``offset`` option specifies the offset into the target file + that the region starts at. You can use this parameter to back + multiple regions with a single file. + The ``pmem`` option specifies whether the backing file specified by ``mem-path`` is in host persistent memory that can be accessed using the SNIA NVM programming model (e.g. Intel |