• Lendacky, Thomas's avatar
    dma-direct: do not include SME mask in the DMA supported check · c92a54cf
    Lendacky, Thomas authored
    The dma_direct_supported() function intends to check the DMA mask against
    specific values. However, the phys_to_dma() function includes the SME
    encryption mask, which defeats the intended purpose of the check. This
    results in drivers that support less than 48-bit DMA (SME encryption mask
    is bit 47) from being able to set the DMA mask successfully when SME is
    active, which results in the driver failing to initialize.
    
    Change the function used to check the mask from phys_to_dma() to
    __phys_to_dma() so that the SME encryption mask is not part of the check.
    
    Fixes: c1d0af1a ("kernel/dma/direct: take DMA offset into account in dma_direct_supported")
    Signed-off-by: 's avatarTom Lendacky <thomas.lendacky@amd.com>
    Signed-off-by: 's avatarChristoph Hellwig <hch@lst.de>
    c92a54cf
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
coherent.c Loading commit data...
contiguous.c Loading commit data...
debug.c Loading commit data...
direct.c Loading commit data...
mapping.c Loading commit data...
swiotlb.c Loading commit data...
virt.c Loading commit data...