# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1165479903 -32400 # Node ID 0ee772ac96c5737ef3c220615c028aebe5a55601 # Parent fd21ff4843cbb886c2b35f74ab0fe32a3309d1fa allow foreign domain page mapping of DOMID_XEN/DOMID_IO. DOMID_XEN is used by xenmon, xentrace. PATCHNAME: allow_foreign_domain_page_mapping_domid_xen Signed-off-by: Isaku Yamahata diff -r fd21ff4843cb -r 0ee772ac96c5 xen/arch/ia64/xen/mm.c --- a/xen/arch/ia64/xen/mm.c Thu Dec 07 15:45:24 2006 +0900 +++ b/xen/arch/ia64/xen/mm.c Thu Dec 07 17:25:03 2006 +0900 @@ -1295,11 +1295,13 @@ __dom0vp_add_physmap(struct domain* d, u if (unlikely(rd == d)) goto out1; - if (is_gmfn) { - if (domid == DOMID_XEN || domid == DOMID_IO) - goto out1; + /* + * DOMID_XEN and DOMID_IO don't have their own p2m table. + * It can be considered that their p2m conversion is p==m. + */ + if (likely(is_gmfn && domid != DOMID_XEN && domid != DOMID_IO)) mfn = gmfn_to_mfn(rd, mfn_or_gmfn); - } else + else mfn = mfn_or_gmfn; if (unlikely(!mfn_valid(mfn) || get_page(mfn_to_page(mfn), rd) == 0)) goto out1;