Re: [Question] How To Log QEMU Memory Access

2012-03-27 Thread Jerry
Hi Perter, I read some code lines of QEMU in the past week and have more understanding about QEMU. But there are also a lot of things unclear in my mind. And I beg you help me again. First, I found there are some x86 instructions translated from TCG instructions will access the "RAM device" direc

Re: [Question] How To Log QEMU Memory Access

2012-03-15 Thread Peter Maydell
2012/3/15 周春华 : > Dear Peter Maydell, > > Thank you for your help. I got an idea to log the guest physical address, > would you mind help me to check it? > > Because the function tcg_out_qemu_ld() and tcg_out_qemu_st() know the guest > virtual address should be accessed, we can call the > [target-a

Re: [Question] How To Log QEMU Memory Access

2012-03-15 Thread 周春华
Dear Peter Maydell, Thank you for your help. I got an idea to log the guest physical address, would you mind help me to check it? Because the function tcg_out_qemu_ld() and tcg_out_qemu_st() know the guest virtual address should be accessed, we can call the [target-arm/helper.c:get_phys_addr] fun

Re: [Question] How To Log QEMU Memory Access

2012-03-15 Thread Peter Maydell
2012/3/15 周春华 : > Peter Maydell wrote: >> Note that there are other slow paths for memory access which don't >> use the TLB and instead do go via physical addresses at the time >> they need to do the load/store. > > I want to know how to use these slow paths. Will they will "guest virtual -> > gues

Re: [Question] How To Log QEMU Memory Access

2012-03-15 Thread 周春华
Dear Peter Maydell, I am very appreciated for you great help. There is still a question exist: Note that there are other slow paths for memory access which don't > use the TLB and instead do go via physical addresses at the time > they need to do the load/store. I want to know how to use these

Re: [Question] How To Log QEMU Memory Access

2012-03-15 Thread Peter Maydell
2012/3/15 周春华 : > Do you means that the QEMU TLB maps the guest virtual address to host > virtual address, Yes. > and the begging and end virtual addresses of the memory > allocated for RAM device emulating are the RAM physical begging and end > address from guest view? I don't know what you mea

Re: [Question] How To Log QEMU Memory Access

2012-03-15 Thread 周春华
Dear Peter Maydell, Thanks for your reply. Would you mind give me more help? My PC architecture is x86, so the tcg_out_qemu_ld() and tcg_out_qemu_st() is in tcg/i386/tcg-target.c. Nevertheless, it is difficult for me to understand them completely. Do you means that the QEMU TLB maps the guest vi

Re: [Question] How To Log QEMU Memory Access

2012-03-14 Thread Peter Maydell
On 14 March 2012 14:01, 周春华 wrote: > I got a job that should log the RAM memory access in the QEMU. First, I > should find out the code line in QEMU to trap all RAM memory access. After > some efforts, I have some conclusions: > > 1. I have found the function dealing with the translation from the

[Question] How To Log QEMU Memory Access

2012-03-14 Thread 周春华
Dear linus.walleij, I am sorry to trouble you. Would you mind give a hand? I got a job that should log the RAM memory access in the QEMU. First, I should find out the code line in QEMU to trap all RAM memory access. After some efforts, I have some conclusions: 1. I have found the function dealin