[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2 of 6] Fix handling of m2p map in set_shared_p2m_entry
xen/arch/x86/mm/p2m.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) When updating a p2m mapping to shared, previous code unconditionally set the m2p entry for the old mfn to invalid. We now check that the old mfn does not remain shared. Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> diff -r d9a344a5c1e3 -r 1ef55d87b459 xen/arch/x86/mm/p2m.c --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -714,8 +714,9 @@ set_shared_p2m_entry(struct domain *d, u * sharable first */ ASSERT(p2m_is_shared(ot)); ASSERT(mfn_valid(omfn)); - /* XXX: M2P translations have to be handled properly for shared pages */ - set_gpfn_from_mfn(mfn_x(omfn), INVALID_M2P_ENTRY); + if ( ((mfn_to_page(omfn)->u.inuse.type_info & PGT_type_mask) + != PGT_shared_page) ) + set_gpfn_from_mfn(mfn_x(omfn), INVALID_M2P_ENTRY); P2M_DEBUG("set shared %lx %lx\n", gfn, mfn_x(mfn)); rc = set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_shared, p2m->default_access); _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |