kernel-fxtec-pro1x/kernel/dma
Lendacky, Thomas 13e554fedd dma-direct: do not include SME mask in the DMA supported check
commit c92a54cfa0257e8ffd66b2a17d49e9c0bd4b769f upstream.

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: c1d0af1a1d ("kernel/dma/direct: take DMA offset into account in dma_direct_supported")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-13 09:51:05 +01:00
..
coherent.c
contiguous.c dma-mapping: fix panic caused by passing empty cma command line argument 2018-11-13 11:08:17 -08:00
debug.c
direct.c dma-direct: do not include SME mask in the DMA supported check 2019-01-13 09:51:05 +01:00
Kconfig dma-mapping: add the missing ARCH_HAS_SYNC_DMA_FOR_CPU_ALL declaration 2018-09-25 15:11:58 -07:00
Makefile
mapping.c
noncoherent.c
swiotlb.c swiotlb: clean up reporting 2018-07-25 13:33:05 +02:00
virt.c