]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/amd: Init unity mappings only for dma_ops domains
authorJoerg Roedel <jroedel@suse.de>
Wed, 13 Jul 2016 10:35:24 +0000 (12:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Aug 2016 16:10:57 +0000 (18:10 +0200)
commit8c62da3de437735d362b0a02d7771b9d7d15dfc9
tree39619c4f109eef9093108ebc0b66aaa15f3cfd6b
parent8deebd2dd9dcbbb3662a0c9ffa9194326f2c77e8
iommu/amd: Init unity mappings only for dma_ops domains

commit b548e786ce47017107765bbeb0f100202525ea83 upstream.

The default domain for a device might also be
identity-mapped. In this case the kernel would crash when
unity mappings are defined for the device. Fix that by
making sure the domain is a dma_ops domain.

Fixes: 0bb6e243d7fb ('iommu/amd: Support IOMMU_DOMAIN_DMA type allocation')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/amd_iommu.c