Skip to content
Commit 4fe87e81 authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

dma-mapping: move pgprot_decrypted out of dma_pgprot

pgprot_decrypted is used by AMD SME systems to allow access to memory
that was set to not encrypted using set_memory_decrypted.  That only
happens for dma-direct memory as the IOMMU solves the addressing
challenges for the encryption bit using its own remapping.

Move the pgprot_decrypted call out of dma_pgprot which is also used
by the IOMMU mappings and into dma-direct so that it is only used with
memory that was set decrypted.

Fixes: f5ff79fd

 ("dma-mapping: remove CONFIG_DMA_REMAP")
Reported-by: default avatarAlex Xu (Hello71) <alex_y_xu@yahoo.ca>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Tested-by: default avatarAlex Xu (Hello71) <alex_y_xu@yahoo.ca>
parent 05b0ebd0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment