Skip to contentSkip to conversation

Running code from IO memory

Qemu-devel G Portokalidis 2 participants 2 messages Jan 28, 2006 – Jan 29, 2006

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
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