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] p2m: Support page orders other than 0 (4k

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] p2m: Support page orders other than 0 (4kB) and 9 (2MB)
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Jul 2008 09:30:16 -0700
Delivery-date: Wed, 09 Jul 2008 09:30:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1215597858 -3600
# Node ID f3afb8625a9236c404cd7190bf5725e691dd1fe2
# Parent  06bcd8f622c846314e46b233b87b8264c358aaf4
p2m: Support page orders other than 0 (4kB) and 9 (2MB)
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/mm/p2m.c |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff -r 06bcd8f622c8 -r f3afb8625a92 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Wed Jul 09 11:02:37 2008 +0100
+++ b/xen/arch/x86/mm/p2m.c     Wed Jul 09 11:04:18 2008 +0100
@@ -530,11 +530,25 @@ void p2m_change_entry_type_global(struct
     p2m_unlock(p2m);
 }
 
-static inline
+static
 int set_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn, 
-                  unsigned int page_order, p2m_type_t p2mt)
-{
-    return d->arch.p2m->set_entry(d, gfn, mfn, page_order, p2mt);
+                    unsigned int page_order, p2m_type_t p2mt)
+{
+    unsigned long todo = 1ul << page_order;
+    unsigned int order;
+    int rc = 0;
+
+    while ( todo )
+    {
+        order = (((gfn | mfn_x(mfn) | todo) & ((1ul << 9) - 1)) == 0) ? 9 : 0;
+        rc = d->arch.p2m->set_entry(d, gfn, mfn, order, p2mt);
+        gfn += 1ul << order;
+        if ( mfn_x(mfn) != INVALID_MFN )
+            mfn = _mfn(mfn_x(mfn) + (1ul << order));
+        todo -= 1ul << order;
+    }
+
+    return rc;
 }
 
 // Allocate a new p2m table for a domain.

_______________________________________________
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] p2m: Support page orders other than 0 (4kB) and 9 (2MB), Xen patchbot-unstable <=