iommu/amd: Do not force direct mapping when SME is active
authorJoerg Roedel <jroedel@suse.de>
Mon, 24 Aug 2020 10:54:14 +0000 (12:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 11:55:37 +0000 (13:55 +0200)
commit5aa21abcedd295a4e3338073f09f2c4849f11e39
treeecec6b59a9af851569e0ed3932a6d649b2226380
parent4898d0e064b9aa5d5697e4b5844384ed8ccddae0
iommu/amd: Do not force direct mapping when SME is active

[ Upstream commit 7cad554887f1c5fd77e57e6bf4be38370c2160cb ]

Do not force devices supporting IOMMUv2 to be direct mapped when memory
encryption is active. This might cause them to be unusable because their
DMA mask does not include the encryption bit.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Link: https://lore.kernel.org/r/20200824105415.21000-2-joro@8bytes.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/amd/iommu.c