WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Questions for the shadow page code

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Questions for the shadow page code
From: Yao <yffbrave@xxxxxxx>
Date: Fri, 11 Mar 2011 10:35:12 +0800 (CST)
Delivery-date: Thu, 10 Mar 2011 18:36:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi, guys
Lately I've been researching the implementation of the shadow page and I didn't really understand the mechanism. For instance, the function shadow_get_and_create_l*e in x86/mm/shadow/multi.c
If the GuestOS is 32-bit, then shadow_get_and_create_l1e should execute
{
    *sl2mfn = pagetable_get_mfn(v->arch.shadow_table[0]);

    (void) shadow_l2_index(sl2mfn, guest_l2_table_offset(gw->va));

    return sh_linear_l2_table(v) + shadow_l2_linear_offset(gw->va);
}
1.How does the Xen organize the spt? it looks like xen used 36-bit pae for spt, but how does it correspond to the guest 2 level page table?
2.What's the function of sh_linear_l2_table & the whole return sentence? It's the same situation in the shadow_get_and_cr eate_l2e.  There are some assemble code and it screw me up :(
3.Are there any docs to help me to figure it out?


Regards,
Yao


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>