Avi Kivity wrote:
On 04/30/2010 05:25 AM, Lai Jiangshan wrote:The corresponding content in mmu.txt are:
Yes. btw, can you update the patch to also correct mmu.txt?It's unrelated to TDP, same issue with shadow. I think the calculationAvi, Marcelo
is correct. For example the 4th spte for a level=2 page will yield
gfn=4*512.
Thank you very much.
The calculation I used is correct.
role.direct:
If set, leaf sptes reachable from this page are for a linear range.
Examples include real mode translation, large guest pages backed by small
host pages, and gpa->hpa translations when NPT or EPT is active.
The linear range starts at (gfn<< PAGE_SHIFT) and its size is determined
by role.level (2MB for first level, 1GB for second level, 0.5TB for third
level, 256TB for fourth level)
If clear, this page corresponds to a guest page table denoted by the gfn
field.
gfn:
Either the guest page table containing the translations shadowed by this
page, or the base page frame for linear translations. See role.direct.
These are correct. My patch is fully base on this document.
I think it is not need to be fixed.
Did I miss something?