2

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?

3
  • Try adding the share option: -object memory-backend-file,share=on,... (untested).
    – user414777
    Oct 27, 2020 at 9:59
  • no difference :( Oct 27, 2020 at 13:39
  • Look at all the other options for memory-backend-file, especially the id=ID ... -device memdev=ID combo. I'm not able to test it right now. Anyways, edit your Q and show the complete command line you're using and all the details so someone could be able to reproduce it.
    – user414777
    Oct 27, 2020 at 14:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.