iommu: add dma_get_mask helper function