I think I could not explain my question regarding "addl %ebx, (%eax)". What I wanted to ask was that this instruction also accesses the memory and I also need to intercept it within a transaction. Incase of "addl %ebx, (%eax)", Are the functions under "/* CPU memory access without any memory or io remapping */" called in case of this instruction.
Yes. Just look how the instruction is translated into opcodes and you'll see how it works. You can use the -d switch for this.
Secondly, there is a function in "exec.c" called "cpu_physical_memory_rw". Is it easier to hack into this fuction to intercept the memory references.
That function is used by emulated hardware devices to interact with memory (
e.g. DMA to write and read memory chunks). Translated guest code does not use it.
Regards,
Eduardo