ia64/xen-unstable

changeset 12884:45f79978ceb5

[IA64] allow foreign domain page mapping of DOMID_XEN/DOMID_IO

DOMID_XEN is used by xenmon, xentrace.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild2.aw
date Thu Dec 07 15:02:37 2006 -0700 (2006-12-07)
parents bc3044bf4928
children c650fe6d56f6
files xen/arch/ia64/xen/mm.c
line diff
     1.1 --- a/xen/arch/ia64/xen/mm.c	Thu Dec 07 15:00:49 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/mm.c	Thu Dec 07 15:02:37 2006 -0700
     1.3 @@ -1295,11 +1295,13 @@ static unsigned long
     1.4  
     1.5      if (unlikely(rd == d))
     1.6          goto out1;
     1.7 -    if (is_gmfn) {
     1.8 -        if (domid == DOMID_XEN || domid == DOMID_IO)
     1.9 -            goto out1;
    1.10 +    /*
    1.11 +     * DOMID_XEN and DOMID_IO don't have their own p2m table.
    1.12 +     * It can be considered that their p2m conversion is p==m.
    1.13 +     */
    1.14 +    if (likely(is_gmfn && domid != DOMID_XEN && domid != DOMID_IO))
    1.15          mfn = gmfn_to_mfn(rd, mfn_or_gmfn);
    1.16 -    } else 
    1.17 +    else 
    1.18          mfn = mfn_or_gmfn;
    1.19      if (unlikely(!mfn_valid(mfn) || get_page(mfn_to_page(mfn), rd) == 0))
    1.20          goto out1;