ia64/xen-unstable

changeset 18776:3af208e6f850

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@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Nov 06 11:07:02 2008 +0000 (2008-11-06)
parents 5fd51e1e9c79
children 6b6610c115fc
files xen/arch/x86/mm/hap/guest_walk.c xen/arch/x86/mm/p2m.c
line diff
     1.1 --- a/xen/arch/x86/mm/hap/guest_walk.c	Wed Nov 05 10:57:21 2008 +0000
     1.2 +++ b/xen/arch/x86/mm/hap/guest_walk.c	Thu Nov 06 11:07:02 2008 +0000
     1.3 @@ -83,7 +83,7 @@ unsigned long hap_gva_to_gfn(GUEST_PAGIN
     1.4      gpfn = (gcr3 >> PAGE_SHIFT);
     1.5      for ( lev = mode; lev >= 1; lev-- )
     1.6      {
     1.7 -        mfn = mfn_x(gfn_to_mfn_current(gpfn, &p2mt));
     1.8 +        mfn = mfn_x(gfn_to_mfn(v->domain, gpfn, &p2mt));
     1.9          if ( !p2m_is_ram(p2mt) )
    1.10          {
    1.11              HAP_PRINTK("bad pfn=0x%lx from gva=0x%lx at lev%d\n", gpfn, gva,
     2.1 --- a/xen/arch/x86/mm/p2m.c	Wed Nov 05 10:57:21 2008 +0000
     2.2 +++ b/xen/arch/x86/mm/p2m.c	Thu Nov 06 11:07:02 2008 +0000
     2.3 @@ -748,7 +748,7 @@ static void audit_p2m(struct domain *d)
     2.4  
     2.5          if ( test_linear && (gfn <= d->arch.p2m->max_mapped_pfn) )
     2.6          {
     2.7 -            lp2mfn = mfn_x(gfn_to_mfn_current(gfn, &type));
     2.8 +            lp2mfn = mfn_x(gfn_to_mfn(d, gfn, &type));
     2.9              if ( lp2mfn != mfn_x(p2mfn) )
    2.10              {
    2.11                  P2M_PRINTK("linear mismatch gfn %#lx -> mfn %#lx "