amd-iommu: move page table allocation code to seperate function