Bug 9252 - [devel-6.6] Intel IAA Compression Accelerator Crypto Driver (iaa_crypto)
Summary: [devel-6.6] Intel IAA Compression Accelerator Crypto Driver (iaa_crypto)
Status: IN_PROGRESS
Alias: None
Product: ANCK 6.6 Dev
Classification: ANCK
Component: X86 (show other bugs) X86
Version: unspecified
Hardware: x86_64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Guanjun
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-29 18:00 UTC by xiaochenshen
Modified: 2024-05-30 12:23 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xiaochenshen intel_group 2024-05-29 18:00:20 UTC
**About Intel IAA Compression Accelerator Crypto Driver**

(1) IAA Compression Accelerator Crypto Driver
The IAA crypto driver supports compression/decompression compatible with the DEFLATE compression standard described in RFC 1951, which is the compression/decompression algorithm exported by this module.

The IAA hardware spec can be found here: 
https://cdrdv2.intel.com/v1/dl/getContent/721858

The iaa_crypto driver is designed to work as a layer underneath higher-level compression devices such as zswap. Users can select IAA compress/decompress acceleration by specifying one of the supported IAA compression algorithms in whatever facility allows compression algorithms to be selected.

For example, a zswap device can select the IAA 'fixed' mode represented by selecting the 'deflate-iaa' crypto compression
algorithm:
```
echo deflate-iaa > /sys/module/zswap/parameters/compressor
```

This will tell zswap to use the IAA 'fixed' compression mode for all compresses and decompresses.

(2) Config options and other setup
Kernel configs:
```
Cryptographic API -> Hardware crypto devices -> Support for Intel(R) IAA Compression Accelerator
CONFIG_CRYPTO_DEV_IAA_CRYPTO=m

Cryptographic API -> Hardware crypto devices -> Support for Intel(R) IAA Compression -> Enable Intel(R) IAA Compression Accelerator Statistics
CONFIG_CRYPTO_DEV_IAA_CRYPTO_STATS=y
```

The following config options should also be enabled:
```
CONFIG_IRQ_REMAP=y
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_SVM=y
CONFIG_PCI_ATS=y
CONFIG_PCI_PRI=y
CONFIG_PCI_PASID=y
CONFIG_INTEL_IDXD=m
CONFIG_INTEL_IDXD_SVM=y
```
(3) More details
For more details on typical usage, driver attributes, configuration, statistics, use cases and IAA sysfs config interface,
please refer to kernel document:  
```
Documentation/driver-api/crypto/iaa/iaa-crypto.rst
```
Comment 1 xiaochenshen intel_group 2024-05-29 20:11:45 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3291
Comment 2 小龙 admin 2024-05-30 12:23:41 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/3291