• Tom Lendacky's avatar
    iommu/amd: Do not disable SWIOTLB if SME is active · aba2d9a6
    Tom Lendacky authored
    When SME memory encryption is active it will rely on SWIOTLB to handle
    DMA for devices that cannot support the addressing requirements of
    having the encryption mask set in the physical address.  The IOMMU
    currently disables SWIOTLB if it is not running in passthrough mode.
    This is not desired as non-PCI devices attempting DMA may fail. Update
    the code to check if SME is active and not disable SWIOTLB.
    
    Fixes: 2543a786 ("iommu/amd: Allow the AMD IOMMU to work with memory encryption")
    Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    aba2d9a6
amd_iommu.c 101 KB