Running code from IO memory
I've been hacking Qemu for Argos, and i was wondering whether it is possible to execute code from a virtual peripherals memory.
To be more explicit, i have coded a virtual peripheral that does nothing, but register some physical memory for memory io. This physical address is mapped into a process's address space. I would like to place code to be executed into that memory space.
Can qemu's JIT handle such cases?
I point eip to the corresponding virtual address, but everything crashes.
Anyone?
Cheers,
Giorgos
Quoted 2 lines · G Portokalidis
I've been hacking Qemu for Argos, and i was wondering whether it is possible to execute code from a virtual peripherals memory.
Short answer is no.
The basic problem is because qemu uses dynamic translation, code is read once in a big block, then executed an arbitrary number of times.
You could maybe hack qemu to make execution from volatile memory work, but it certainly doesn't work out the box.
Paul