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-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [SHADOW] Build p2m mapping according to m2p mapping.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 02 Aug 2006 10:40:17 +0000
Delivery-date: Wed, 02 Aug 2006 03:43:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [SHADOW] Build p2m mapping according to m2p mapping., Xen patchbot-unstable <=