aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/amd_iommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r--arch/x86/kernel/amd_iommu.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index ebc1c8443926..6ffb3e637657 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -530,8 +530,7 @@ static int iommu_map_page(struct protection_domain *dom,
530 bus_addr = PAGE_ALIGN(bus_addr); 530 bus_addr = PAGE_ALIGN(bus_addr);
531 phys_addr = PAGE_ALIGN(phys_addr); 531 phys_addr = PAGE_ALIGN(phys_addr);
532 532
533 /* only support 512GB address spaces for now */ 533 if (!(prot & IOMMU_PROT_MASK))
534 if (bus_addr > IOMMU_MAP_SIZE_L3 || !(prot & IOMMU_PROT_MASK))
535 return -EINVAL; 534 return -EINVAL;
536 535
537 pte = alloc_pte(dom, bus_addr, NULL, GFP_KERNEL); 536 pte = alloc_pte(dom, bus_addr, NULL, GFP_KERNEL);