lib/crypto: x86/sha: Add PHE Extensions support
Status from this message: Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-fixes
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest2 patches 2 repliesApplied
- v33 patches 9 repliesSuperseded
- v22 patches 6 repliesSuperseded
Changes in v4 from the cover letter
- Include benchmark results, test results, and the specification link directly in the commit message instead of the cover letter.
- Check CONFIG_CPU_SUP_ZHAOXIN directly in the condition rather than using #if/#endif for conditional compilation.
- Combine the CPU family check and the X86_FEATURE_PHE_EN feature check into a single condition.
- Correct the comment describing the instruction register requirements in both 32-bit and 64-bit operation modes.
- Fix the inline assembly constraints to match the instruction behavior for input and output registers.
- Only include XSHA256 support for SHA-256 and drop XSHA1 support.
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | crypto: padlock-sha - Disable for Zhaoxin processordrivers/ | +7 | 1 reply | |
| 2/2 | lib/crypto: x86/sha256: PHE Extensions optimized SHA256 transform functionlib/ | +25 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 0/2] lib/crypto: x86/sha: Add PHE Extensions support
This series adds support for PHE Extensions optimized SHA256 transform functions for Zhaoxin processors in lib/crypto, and disables the padlock-sha driver on Zhaoxin platforms due to self-test failures.
After applying this patch series, the data block processing throughput increases by approximately 2 to 5 times on the Zhaoxin KX-7000 platform, depending on block size and hash algorithm, as measured by CRYPTO_LIB_BENCHMARK. The KUnit test suites also pass successfully.
Changes in v4:
- Include benchmark results, test results, and the specification link directly in the commit message instead of the cover letter.
- Check CONFIG_CPU_SUP_ZHAOXIN directly in the condition rather than using #if/#endif for conditional compilation.
- Combine the CPU family check and the X86_FEATURE_PHE_EN feature check into a single condition.
- Correct the comment describing the instruction register requirements in both 32-bit and 64-bit operation modes.
- Fix the inline assembly constraints to match the instruction behavior for input and output registers.
- Only include XSHA256 support for SHA-256 and drop XSHA1 support.
Changes in v3:
- Implement PHE Extensions optimized SHA1 and SHA256 transform functions using inline assembly instead of separate assembly files
- Eliminate unnecessary casts
- Add CONFIG_CPU_SUP_ZHAOXIN check to compile out the code when disabled
- Use 'boot_cpu_data.x86' to identify the CPU family instead of 'cpu_data(0).x86'
- Only check X86_FEATURE_PHE_EN for CPU support, consistent with other CPU feature checks.
- Disable the padlock-sha driver on Zhaoxin processors with CPU family 0x07 and newer.
Changes in v2:
- Add Zhaoxin support to lib/crypto instead of extending the existing padlock-sha driver
AlanSong-oc (2):
crypto: padlock-sha - Disable for Zhaoxin processor lib/crypto: x86/sha256: PHE Extensions optimized SHA256 transform
function
drivers/crypto/padlock-sha.c | 7 +++++++ lib/crypto/x86/sha256.h | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+)
Signature · 1 line
2.34.1