Skip to contentSkip to conversation

Question about memory micro operations in Qemu 0.12.x

Qemu-devel [email protected] 1 participant 2 messages Mar 26, 2010 – Mar 29, 2010 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello.
in qemu 0.9.x there was a special file with micro-operations, which implemented access to memory. For example for arm architecture it was op_mem.h file. I was able to add some printfs to this functions and get information about memory accesses.

My question is : how memory access microoperations are now implemented in qemu 0.12.x ?

Thanks for you answers.

author
#2 lore raw
In reply to a message not in the archive

Thank you for your answer.

I still have some questions.

27.03.2010 12:49, Stuart Brady пишет:

Quoted 13 lines · On Fri, Mar 26, 2010 at 11:23:30PM +0300, [email protected] wrote:
Quoted 7 lines

Hello.
in qemu 0.9.x there was a special file with micro-operations, which implemented access to memory. For example for arm architecture it was op_mem.h file. I was able to add some printfs to this functions and get information about memory accesses.

Quoted 5 lines

My question is : how memory access microoperations are now implemented in qemu 0.12.x ?

Thanks for you answers.

Quoted 9 lines

To generate load and store operations, tcg_gen_qemu_{ld,st}*() are now used. See tcg/README for more information on TCG ops.

In tcg/*/tcg-target.c, you'll find tcg_out_qemu_{ld,st}(). The easiest way to do this would probably be to place your printfs in __ld_mmu() and __st_mmu() (which are defined via softmmu_template.h), and remove the TLB lookups from tcg_out_qemu_{ld,st}() so that your tracing code is always called.

1. How can I remove TLB lookups from tcg_out_qemu_{ld,st} ?

Quoted 4 lines

Instead of modifying tcg_out_qemu_{ld,st}(), you might also be able to bypass it entirely, by using having tcg_gen_qemu_{ld,st}*() generate calls to a helper function.

2. Can you give me some examples of it ?

Quoted 2 lines

Cheers,

Thanks for your help.