summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-09-14 14:46:33 +0100
committerMark Brown <broonie@kernel.org>2026-09-14 14:46:33 +0100
commit24677899a355a29412b31c8489db3317b6a7134d (patch)
treee095458cd5894e23f4b39ac59004f1cd82b7da38 /arch
parent275ac09b389ccfd55045a0ab8924ab18d9a6f518 (diff)
parent55a8e1451869233db837a97e8f3cbf9983bc8678 (diff)
downloadlinux-next-24677899a355a29412b31c8489db3317b6a7134d.tar.gz
linux-next-24677899a355a29412b31c8489db3317b6a7134d.zip
Merge branch 'dma-mapping-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/mszyprowski/linux.git
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/mm/mem_encrypt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c
index 95bae74fdab2..3aefdef5bcb0 100644
--- a/arch/x86/mm/mem_encrypt.c
+++ b/arch/x86/mm/mem_encrypt.c
@@ -13,6 +13,7 @@
#include <linux/cc_platform.h>
#include <linux/mem_encrypt.h>
#include <linux/virtio_anchor.h>
+#include <linux/iommu-dma.h>
#include <asm/sev.h>
@@ -30,7 +31,7 @@ bool force_dma_unencrypted(struct device *dev)
* device does not support DMA to addresses that include the
* encryption mask.
*/
- if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT)) {
+ if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT) && !use_dma_iommu(dev)) {
u64 dma_enc_mask = DMA_BIT_MASK(__ffs64(sme_me_mask));
u64 dma_dev_mask = min_not_zero(dev->coherent_dma_mask,
dev->bus_dma_limit);