qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] QEMU Address Translation "Where is data stored"?


From: Shiva
Subject: [Qemu-devel] QEMU Address Translation "Where is data stored"?
Date: Fri, 10 Apr 2015 12:31:35 -0400

This is my setup: 
Inside a vm, in userspace program, I store a variable with value "8" at address bf9ee1a0. 
I get a physical address of ff9ee1a0 corresponding to the address when I call virt_to_phys function in kernel space inside vm.
On the qemu, pte and pte_addr are a5913865 and bf955f78 respectively.I just used the x86_cpu_handle_mmu_fault function and added certain printf statements.
My understanding was the mapping that the os and the qemu has should be same. i.e. bf9ee1a0 should be mapped to a5913865.
I know there are many levels of translations involved here. Guest virtual — Guest physical — Host virtual.

Here is my questions:
1. I wanted to know where is the data actually stored?
2. What does the virt_to_phys() then mean?  
3. I made sure that the address used in control registers are the same in both os inside vm and in qemu for paging. Then why is this discrepency?
4. If one needs to print the contents of the page that pte has in qemu, how does one use printf statements to print them?

Any insight is greatly appreciated.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]