@@ -195,8 +195,8 @@ void __hwdom_init iommu_hwdom_init(struct domain *d)
page_list_for_each ( page, &d->page_list )
{
- unsigned long mfn = mfn_x(page_to_mfn(page));
- unsigned long dfn = mfn_to_gmfn(d, mfn);
+ mfn_t mfn = page_to_mfn(page);
+ dfn_t dfn = _dfn(gfn_x(mfn_to_gfn(d, mfn)));
unsigned int mapping = IOMMUF_readable;
int ret;
@@ -205,8 +205,7 @@ void __hwdom_init iommu_hwdom_init(struct domain *d)
== PGT_writable_page) )
mapping |= IOMMUF_writable;
- ret = iommu_map(d, _dfn(dfn), _mfn(mfn), 0, mapping,
- &flush_flags);
+ ret = iommu_map(d, dfn, mfn, 0, mapping, &flush_flags);
if ( !rc )
rc = ret;
@@ -321,10 +321,8 @@ struct page_info *get_page_from_gva(struct vcpu *v, vaddr_t va,
#define SHARED_M2P_ENTRY (~0UL - 1UL)
#define SHARED_M2P(_e) ((_e) == SHARED_M2P_ENTRY)
-/* Xen always owns P2M on ARM */
+/* We don't have a M2P on Arm */
#define set_gpfn_from_mfn(mfn, pfn) do { (void) (mfn), (void)(pfn); } while (0)
-#define mfn_to_gmfn(_d, mfn) (mfn)
-
/* Arch-specific portion of memory_op hypercall. */
long arch_memory_op(int op, XEN_GUEST_HANDLE_PARAM(void) arg);
@@ -506,11 +506,6 @@ extern struct rangeset *mmio_ro_ranges;
#define get_gpfn_from_mfn(mfn) (machine_to_phys_mapping[(mfn)])
-#define mfn_to_gmfn(_d, mfn) \
- ( (paging_mode_translate(_d)) \
- ? get_gpfn_from_mfn(mfn) \
- : (mfn) )
-
#define compat_pfn_to_cr3(pfn) (((unsigned)(pfn) << 12) | ((unsigned)(pfn) >> 20))
#define compat_cr3_to_pfn(cr3) (((unsigned)(cr3) >> 12) | ((unsigned)(cr3) << 20))