From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
To: Steven <wangwangkang@gmail.com>
Cc: xiaoguangrong@cn.fujitsu.com, ravi.bhargava@amd.com,
benjamin.serebrin@amd.com, kvm@vger.kernel.org
Subject: Re: Understanding KVM nested paging theory
Date: Fri, 13 Apr 2012 19:15:54 +0800 [thread overview]
Message-ID: <4F880AEA.2090203@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAMTrTqV4yV4bvfnK=wYe604YbSbXVhkposj1qvFhL4N3VqiruQ@mail.gmail.com>
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
prev parent reply other threads:[~2012-04-13 11:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 6:03 Understanding KVM nested paging theory Steven
2012-04-13 11:15 ` Xiao Guangrong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F880AEA.2090203@linux.vnet.ibm.com \
--to=xiaoguangrong@linux.vnet.ibm.com \
--cc=benjamin.serebrin@amd.com \
--cc=kvm@vger.kernel.org \
--cc=ravi.bhargava@amd.com \
--cc=wangwangkang@gmail.com \
--cc=xiaoguangrong@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.