x86/iommu: extract useful utilities into x86_iommu.c
(cherry picked from commit 40d951bc5932deb87635f5c1780a6706d0c7c012)