We're emulating a Cortex M3 cpu and would like to pass some parameters to the guest during run-time. The simplest idea seems to be to write directly to some memory area. I tried simply adding
-mem-path /tmp/qemu.ram which did nothing. Adding
-object memory-backend-file,id=mem,size=128K,mem-path /tmp/qemu.ram \
worked in that qemu opened it at least. But nothing is written to it during run-time and there seems to be no connection between the guest memory map and the file at all.
To clarify, what I expected to happen is that QEMU, instead of mallocing guest RAM, mmaps the file and uses that instead. This would enable me to seek, read and write from this file during run-time. What am I missing? Is there any other convenient way to get write access to RAM/MMIO of the guest during run-time?