]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iommu/amd: Initialize dma-ops domains with 3-level page-table
authorJoerg Roedel <jroedel@suse.de>
Tue, 26 Jul 2016 13:31:23 +0000 (15:31 +0200)
committerJoerg Roedel <jroedel@suse.de>
Tue, 26 Jul 2016 13:56:39 +0000 (15:56 +0200)
A two-level page-table can map up to 1GB of address space.
With the IOVA allocator now in use, the allocated addresses
are often more closely to 4G, which requires the address
space to be increased much more often. Avoid that by using a
three-level page-table by default.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c

index 9703913f6bdd8ae79b4a3a21f828c350177bde70..33c177ba93bebd86c29258c3b26940d2f2d8e06b 100644 (file)
@@ -1673,7 +1673,7 @@ static struct dma_ops_domain *dma_ops_domain_alloc(void)
        if (protection_domain_init(&dma_dom->domain))
                goto free_dma_dom;
 
-       dma_dom->domain.mode = PAGE_MODE_2_LEVEL;
+       dma_dom->domain.mode = PAGE_MODE_3_LEVEL;
        dma_dom->domain.pt_root = (void *)get_zeroed_page(GFP_KERNEL);
        dma_dom->domain.flags = PD_DMA_OPS_MASK;
        if (!dma_dom->domain.pt_root)