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] ept p2m: replace unsigned long with mfn_t

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ept p2m: replace unsigned long with mfn_t for mfns.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 06 Aug 2009 05:35:26 -0700
Delivery-date: Thu, 06 Aug 2009 05:37:02 -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 1249546524 -3600
# Node ID 40394af1155482ada63e6cb09819d11bba4db248
# Parent  1e436b3752b40bbe9f0df257e09de5d7cbf8308a
ept p2m: replace unsigned long with mfn_t for mfns.

Signed-off-by: Patrick Colp <Patrick.Colp@xxxxxxxxxx>
---
 xen/arch/x86/mm/hap/p2m-ept.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff -r 1e436b3752b4 -r 40394af11554 xen/arch/x86/mm/hap/p2m-ept.c
--- a/xen/arch/x86/mm/hap/p2m-ept.c     Thu Aug 06 09:14:52 2009 +0100
+++ b/xen/arch/x86/mm/hap/p2m-ept.c     Thu Aug 06 09:15:24 2009 +0100
@@ -402,11 +402,11 @@ static mfn_t ept_get_entry_current(unsig
  * return 1 to not to reset ept entry.
  */
 static int need_modify_ept_entry(struct domain *d, unsigned long gfn,
-                                    unsigned long mfn, uint8_t o_igmt,
+                                    mfn_t mfn, uint8_t o_igmt,
                                     uint8_t o_emt, p2m_type_t p2mt)
 {
     uint8_t igmt, emt;
-    emt = epte_get_entry_emt(d, gfn, mfn, &igmt, 
+    emt = epte_get_entry_emt(d, gfn, mfn_x(mfn), &igmt, 
                                 (p2mt == p2m_mmio_direct));
     if ( (emt == o_emt) && (igmt == o_igmt) )
         return 0;
@@ -420,7 +420,7 @@ void ept_change_entry_emt_with_range(str
     p2m_type_t p2mt;
     uint64_t epte;
     int order = 0;
-    unsigned long mfn;
+    mfn_t mfn;
     uint8_t o_igmt, o_emt;
 
     for ( gfn = start_gfn; gfn <= end_gfn; gfn++ )
@@ -428,8 +428,8 @@ void ept_change_entry_emt_with_range(str
         epte = ept_get_entry_content(d, gfn);
         if ( epte == 0 )
             continue;
-        mfn = (epte & EPTE_MFN_MASK) >> PAGE_SHIFT;
-        if ( !mfn_valid(mfn) )
+        mfn = _mfn((epte & EPTE_MFN_MASK) >> PAGE_SHIFT);
+        if ( !mfn_valid(mfn_x(mfn)) )
             continue;
         p2mt = (epte & EPTE_AVAIL1_MASK) >> EPTE_AVAIL1_SHIFT;
         o_igmt = (epte & EPTE_IGMT_MASK) >> EPTE_IGMT_SHIFT;
@@ -447,7 +447,7 @@ void ept_change_entry_emt_with_range(str
                 order = EPT_TABLE_ORDER;
                 if ( need_modify_ept_entry(d, gfn, mfn, 
                                             o_igmt, o_emt, p2mt) )
-                    ept_set_entry(d, gfn, _mfn(mfn), order, p2mt);
+                    ept_set_entry(d, gfn, mfn, order, p2mt);
                 gfn += 0x1FF;
             }
             else
@@ -455,7 +455,7 @@ void ept_change_entry_emt_with_range(str
                 /* change emt for partial entries of the 2m area. */
                 if ( need_modify_ept_entry(d, gfn, mfn, 
                                             o_igmt, o_emt, p2mt) )
-                    ept_set_entry(d, gfn, _mfn(mfn), order, p2mt);
+                    ept_set_entry(d, gfn, mfn, order, p2mt);
                 gfn = ((gfn >> EPT_TABLE_ORDER) << EPT_TABLE_ORDER) + 0x1FF;
             }
         }
@@ -463,7 +463,7 @@ void ept_change_entry_emt_with_range(str
         {
             if ( need_modify_ept_entry(d, gfn, mfn, 
                                             o_igmt, o_emt, p2mt) )
-                ept_set_entry(d, gfn, _mfn(mfn), order, p2mt);
+                ept_set_entry(d, gfn, mfn, order, p2mt);
         }
     }
 }

_______________________________________________
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] ept p2m: replace unsigned long with mfn_t for mfns., Xen patchbot-unstable <=