* Understanding KVM nested paging theory
@ 2012-04-11 6:03 Steven
2012-04-13 11:15 ` Xiao Guangrong
0 siblings, 1 reply; 2+ messages in thread
From: Steven @ 2012-04-11 6:03 UTC (permalink / raw)
To: xiaoguangrong, ravi.bhargava, benjamin.serebrin; +Cc: kvm
Hi, Guangrong,
I read your very nice slides at LCJ 2011, "KVM MMU virtualization".
However, I have some confusion about nested paging,
which you gave a simplified example to illustrate in slide 11.
The very first step is to use gCR3 as the input to the nested page
walk. So you mark gCR3 as the guest physical address (gpa).
So my first question is whether gCR3 is exactly the GPA as the input
to the nested paging?
Then after the nested page walk, we can have hpa. Now suppose we
use the first 10 bit of the gva to combine with the hpa to find the
guest table entry. Here is this step like traditional x86 paging,
ie.., hpa as the base to the guest page directory (guest page table
page) and gva is the offset?
If so, I feel that this is contradict to figure 1(b) of the paper
"Accelerating Two-Dimensional Page Walks for Virtualized Systems". In
this paper, gva is used at the very beginning to combine with gCR3 to
generate a GPA, instead of after the nested paging.
I don't know which way is correct. Could you help to explain this? Thanks.
- ha
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Understanding KVM nested paging theory
2012-04-11 6:03 Understanding KVM nested paging theory Steven
@ 2012-04-13 11:15 ` Xiao Guangrong
0 siblings, 0 replies; 2+ messages in thread
From: Xiao Guangrong @ 2012-04-13 11:15 UTC (permalink / raw)
To: Steven; +Cc: xiaoguangrong, ravi.bhargava, benjamin.serebrin, kvm
On 04/11/2012 02:03 PM, Steven wrote:
> Hi, Guangrong,
> I read your very nice slides at LCJ 2011, "KVM MMU virtualization".
> However, I have some confusion about nested paging,
> which you gave a simplified example to illustrate in slide 11.
> The very first step is to use gCR3 as the input to the nested page
I remember that i did not mention nested mmu in my presentation,
the illustrate is about shadow mmu.
> walk. So you mark gCR3 as the guest physical address (gpa).
> So my first question is whether gCR3 is exactly the GPA as the input
> to the nested paging?
No, on nested mmu, the guest page table is from nested guest's
vmcb.nested_cr3/vmcs.eptp which translates nested guest's gpa to
L1 guest's gpa.
>
> Then after the nested page walk, we can have hpa. Now suppose we
> use the first 10 bit of the gva to combine with the hpa to find the
> guest table entry. Here is this step like traditional x86 paging,
> ie.., hpa as the base to the guest page directory (guest page table
> page) and gva is the offset?
gva -> gpa
The npt/ept table is walked base on gpa.
> If so, I feel that this is contradict to figure 1(b) of the paper
> "Accelerating Two-Dimensional Page Walks for Virtualized Systems". In
> this paper, gva is used at the very beginning to combine with gCR3 to
> generate a GPA, instead of after the nested paging.
gCR3 stores the page table to translate gva to gpa on guest.
And npt/ept table translate gpa to pfn, and the table is established by host.
I find a paper on google, hope it is useful for you:
http://researcher.ibm.com/files/us-bbfinkel/turtles_paper.pdf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-13 11:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-11 6:03 Understanding KVM nested paging theory Steven
2012-04-13 11:15 ` Xiao Guangrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox