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>
---
v1 -> v2:
- add qom documentation
- propagate offset into truncate, size and alignment checks
v2 -> v3:
- failed attempt at fixing typo
v3 -> v4:
- fix typo
v4 -> v5:
- improve qom doc comment
- account for fd_offset in more places
---