Re: Understanding KVM nested paging theory

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

 



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


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux