The assert was originally added to make sure that higher order regions (> PAGE_ORDER_4K) could not be used to bypass the mmio_ro_ranges check performed by p2m_type_to_flags.
This however is already checked in set_mmio_p2m_entry, which makes sure that higher order mappings don't overlap with mmio_ro_ranges, thus allowing the creation of high order MMIO mappings safely. Remove the assert to allow 2M entries to be created for MMIO regions that don't overlap with mmio_ro_ranges. Suggested-by: George Dunlap <[email protected]> Signed-off-by: Roger Pau Monné <[email protected]> --- Cc: George Dunlap <[email protected]> Cc: Jan Beulich <[email protected]> Cc: Andrew Cooper <[email protected]> Cc: Wei Liu <[email protected]> Cc: Juergen Gross <[email protected]> --- Without this patch trying to create a PVH dom0 will trigger an assert on certain hardware depending on the memory map. --- xen/arch/x86/mm/p2m-pt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch/x86/mm/p2m-pt.c b/xen/arch/x86/mm/p2m-pt.c index 12f92cf1f0..b8996e5415 100644 --- a/xen/arch/x86/mm/p2m-pt.c +++ b/xen/arch/x86/mm/p2m-pt.c @@ -668,7 +668,6 @@ p2m_pt_set_entry(struct p2m_domain *p2m, gfn_t gfn_, mfn_t mfn, } ASSERT(p2m_flags_to_type(flags) != p2m_ioreq_server); - ASSERT(!mfn_valid(mfn) || p2mt != p2m_mmio_direct); l2e_content = mfn_valid(mfn) || p2m_allows_invalid_mfn(p2mt) ? p2m_l2e_from_pfn(mfn_x(mfn), p2m_type_to_flags(p2m, p2mt, mfn, 1)) -- 2.20.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
