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] [XEN] add typed p2m entry-setting functio

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] add typed p2m entry-setting function
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Sep 2007 03:40:10 -0700
Delivery-date: Wed, 26 Sep 2007 03:40:50 -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 Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1189759967 -3600
# Node ID a79d2c0436439bda200860b363a7154b3eafbc1e
# Parent  ca495837a7223259ecbdc9f8b1ab69d08ed11002
[XEN] add typed p2m entry-setting function
keeping the old one as a fallback for RAM mappings.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm/p2m.c     |    7 +++----
 xen/include/asm-x86/p2m.h |   11 +++++++++--
 2 files changed, 12 insertions(+), 6 deletions(-)

diff -r ca495837a722 -r a79d2c043643 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Wed Sep 12 15:42:39 2007 +0100
+++ b/xen/arch/x86/mm/p2m.c     Fri Sep 14 09:52:47 2007 +0100
@@ -679,8 +679,8 @@ guest_physmap_remove_page(struct domain 
 }
 
 void
-guest_physmap_add_page(struct domain *d, unsigned long gfn,
-                       unsigned long mfn)
+guest_physmap_add_entry(struct domain *d, unsigned long gfn,
+                        unsigned long mfn, p2m_type_t t)
 {
     unsigned long ogfn;
     p2m_type_t ot;
@@ -727,8 +727,7 @@ guest_physmap_add_page(struct domain *d,
 
     if ( mfn_valid(_mfn(mfn)) ) 
     {
-        set_p2m_entry(d, gfn, _mfn(mfn),
-                  p2m_type_to_flags(p2m_ram_rw)|__PAGE_HYPERVISOR|_PAGE_USER);
+        set_p2m_entry(d, gfn, _mfn(mfn), p2m_type_to_flags(t));
         set_gpfn_from_mfn(mfn, gfn);
     }
     else
diff -r ca495837a722 -r a79d2c043643 xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h Wed Sep 12 15:42:39 2007 +0100
+++ b/xen/include/asm-x86/p2m.h Fri Sep 14 09:52:47 2007 +0100
@@ -201,8 +201,15 @@ void p2m_teardown(struct domain *d);
 void p2m_teardown(struct domain *d);
 
 /* Add a page to a domain's p2m table */
-void guest_physmap_add_page(struct domain *d, unsigned long gfn,
-                            unsigned long mfn);
+void guest_physmap_add_entry(struct domain *d, unsigned long gfn,
+                             unsigned long mfn, p2m_type_t t);
+
+/* Untyped version for RAM only, for compatibility */
+static inline void guest_physmap_add_page(struct domain *d, unsigned long gfn,
+                                          unsigned long mfn)
+{
+    guest_physmap_add_entry(d, gfn, mfn, p2m_ram_rw);
+}
 
 /* Remove a page from a domain's p2m table */
 void guest_physmap_remove_page(struct domain *d, unsigned long gfn,

_______________________________________________
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] [XEN] add typed p2m entry-setting function, Xen patchbot-unstable <=