summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intel-svm.c
diff options
context:
space:
mode:
authorDavid Dillow <dillow@google.com>2017-06-28 19:42:23 -0700
committerJoerg Roedel <jroedel@suse.de>2017-07-26 11:12:58 +0200
commitbc24c57159fac5f7e8df22ce3bc8069578684763 (patch)
tree2edc41ad82c692e4d2ba3e722ee999e62092924d /drivers/iommu/intel-svm.c
parent01e1932a1748e20b69ba23d0a01db5eb3a525782 (diff)
downloadop-kernel-dev-bc24c57159fac5f7e8df22ce3bc8069578684763.zip
op-kernel-dev-bc24c57159fac5f7e8df22ce3bc8069578684763.tar.gz
iommu/vt-d: Don't free parent pagetable of the PTE we're adding
When adding a large scatterlist entry that covers more than the L3 superpage size (1GB) but has an alignment such that we must use L2 superpages (2MB) , we give dma_pte_free_level() a range that causes it to free the L3 pagetable we're about to populate. We fix this by telling dma_pte_free_pagetable() about the pagetable level we're about to populate to prevent freeing it. For example, mapping a scatterlist with entry lengths 854MB and 1194MB at IOVA 0xffff80000000 would, when processing the 2MB-aligned second entry, cause pfn_to_dma_pte() to create a L3 directory to hold L2 superpages for the mapping at IOVA 0xffffc0000000. We would previously call dma_pte_free_pagetable(domain, 0xffffc0000, 0xfffffffff), which would free the L3 directory pfn_to_dma_pte() just created for IO PFN 0xffffc0000. Telling dma_pte_free_pagetable() to retain the L3 directories while using L2 superpages avoids the erroneous free. Signed-off-by: David Dillow <dillow@google.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel-svm.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud