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

[Xen-changelog] [xen-unstable] [SHADOW] Build p2m mapping according to m2p mapping.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 3aad3abca9939fe69bea5395a36ecfd907e86400
# Parent  acccec7e213ae3ec121843ac8fbda113b1f446a9
[SHADOW] Build p2m mapping according to m2p mapping.

Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>
Signed-off-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxx>
---
 xen/arch/x86/shadow32.c      |    6 ++++--
 xen/arch/x86/shadow_public.c |    6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff -r acccec7e213a -r 3aad3abca993 xen/arch/x86/shadow32.c
--- a/xen/arch/x86/shadow32.c   Wed Aug 02 09:54:32 2006 +0100
+++ b/xen/arch/x86/shadow32.c   Wed Aug 02 09:58:06 2006 +0100
@@ -990,18 +990,20 @@ alloc_p2m_table(struct domain *d)
 
     list_ent = d->page_list.next;
 
-    for ( gpfn = 0; list_ent != &d->page_list; gpfn++ )
+    while ( list_ent != &d->page_list )
     {
         page = list_entry(list_ent, struct page_info, list);
         mfn = page_to_mfn(page);
 
+        gpfn = get_gpfn_from_mfn(mfn);
+
         if ( !(error = map_p2m_entry(l1tab, gpfn, mfn)) )
         {
             domain_crash(d);
             break;
         }
 
-        list_ent = frame_table[mfn].list.next;
+        list_ent = page->list.next;
     }
 
     unmap_domain_page(l1tab);
diff -r acccec7e213a -r 3aad3abca993 xen/arch/x86/shadow_public.c
--- a/xen/arch/x86/shadow_public.c      Wed Aug 02 09:54:32 2006 +0100
+++ b/xen/arch/x86/shadow_public.c      Wed Aug 02 09:58:06 2006 +0100
@@ -1617,20 +1617,22 @@ alloc_p2m_table(struct domain *d)
 
     list_ent = d->page_list.next;
 
-    for ( gpfn = 0; list_ent != &d->page_list; gpfn++ )
+    while ( list_ent != &d->page_list )
     {
         struct page_info *page;
 
         page = list_entry(list_ent, struct page_info, list);
         mfn = page_to_mfn(page);
 
+        gpfn = get_gpfn_from_mfn(mfn);
+
         if ( !(error = map_p2m_entry(top_tab, gpfn, mfn)) )
         {
             domain_crash(d);
             break;
         }
 
-        list_ent = frame_table[mfn].list.next;
+        list_ent = page->list.next;
     }
 
     unmap_domain_page(top_tab);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.