Re: [PATCH] crypto: qat - fix DMA direction for compression on GEN2 devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 14, 2025 at 08:07:49AM +0100, Giovanni Cabiddu wrote:
> QAT devices perform an additional integrity check during compression by
> decompressing the output. Starting from QAT GEN4, this verification is
> done in-line by the hardware. However, on GEN2 devices, the hardware
> reads back the compressed output from the destination buffer and performs
> a decompression operation using it as the source.
> 
> In the current QAT driver, destination buffers are always marked as
> write-only. This is incorrect for QAT GEN2 compression, where the buffer
> is also read during verification. Since commit 6f5dc7658094
> ("iommu/vt-d: Restore WO permissions on second-level paging entries"),
> merged in v6.16-rc1, write-only permissions are strictly enforced, leading
> to DMAR errors when using QAT GEN2 devices for compression, if VT-d is
> enabled.
> 
> Mark the destination buffers as DMA_BIDIRECTIONAL. This ensures
> compatibility with GEN2 devices, even though it is not required for
> QAT GEN4 and later.
> 
> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@xxxxxxxxx>
> Fixes: cf5bb835b7c8 ("crypto: qat - fix DMA transfer direction")
> Reviewed-by: Ahsan Atta <ahsan.atta@xxxxxxxxx>
> ---
>  drivers/crypto/intel/qat/qat_common/qat_bl.c          | 6 +++---
>  drivers/crypto/intel/qat/qat_common/qat_compression.c | 4 ++--
>  2 files changed, 5 insertions(+), 5 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux