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

[Xen-changelog] [xen-unstable] x86: Use gfn_to_mfn() rather than gfn_to_mfn_current() in callers



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1225969622 0
# Node ID 3af208e6f85013efd12265892998ca357457b9d7
# Parent  5fd51e1e9c798f18a06a43c4cb83df93ac0698dd
x86: Use gfn_to_mfn() rather than gfn_to_mfn_current() in callers
which can execute on arbitrary domains.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/mm/hap/guest_walk.c |    2 +-
 xen/arch/x86/mm/p2m.c            |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -r 5fd51e1e9c79 -r 3af208e6f850 xen/arch/x86/mm/hap/guest_walk.c
--- a/xen/arch/x86/mm/hap/guest_walk.c  Wed Nov 05 10:57:21 2008 +0000
+++ b/xen/arch/x86/mm/hap/guest_walk.c  Thu Nov 06 11:07:02 2008 +0000
@@ -83,7 +83,7 @@ unsigned long hap_gva_to_gfn(GUEST_PAGIN
     gpfn = (gcr3 >> PAGE_SHIFT);
     for ( lev = mode; lev >= 1; lev-- )
     {
-        mfn = mfn_x(gfn_to_mfn_current(gpfn, &p2mt));
+        mfn = mfn_x(gfn_to_mfn(v->domain, gpfn, &p2mt));
         if ( !p2m_is_ram(p2mt) )
         {
             HAP_PRINTK("bad pfn=0x%lx from gva=0x%lx at lev%d\n", gpfn, gva,
diff -r 5fd51e1e9c79 -r 3af208e6f850 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c     Wed Nov 05 10:57:21 2008 +0000
+++ b/xen/arch/x86/mm/p2m.c     Thu Nov 06 11:07:02 2008 +0000
@@ -748,7 +748,7 @@ static void audit_p2m(struct domain *d)
 
         if ( test_linear && (gfn <= d->arch.p2m->max_mapped_pfn) )
         {
-            lp2mfn = mfn_x(gfn_to_mfn_current(gfn, &type));
+            lp2mfn = mfn_x(gfn_to_mfn(d, gfn, &type));
             if ( lp2mfn != mfn_x(p2mfn) )
             {
                 P2M_PRINTK("linear mismatch gfn %#lx -> mfn %#lx "

_______________________________________________
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®.