x86: Remove cpu_has_xfeatures() and add AVX-512 xor_gen()
Status from this message: The following commit has been merged into the x86/fpu branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest8 patches 5 repliesApplied
- v48 patches 0 repliesSuperseded
- v38 patches 2 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 8 patches | 21 replies | Superseded | |
| v1 | 8 patches | 10 replies | Superseded |
Changes in v5 from the cover letter
- Replaced benchmark results with the new xor_benchmark
- Consolidated the vzeroupper in xor-avx512.c into one location
Patches in v5 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | x86/fpu: Check for missing AVX and AVX-512 xstate bitsarch/ | +23 | 0 replies | |
| 2/8 | um: Check for missing AVX and AVX-512 xstate bitsarch/ | +77 | 0 replies | |
| 3/8 | crypto: x86 - Stop using cpu_has_xfeatures()arch/ arch/ arch/ +11 more | +19 | 0 replies | |
| 4/8 | lib/crypto: x86: Stop using cpu_has_xfeatures()lib/ lib/ lib/ +5 more | +9 | 0 replies | |
| 5/8 | lib/crc: x86: Stop using cpu_has_xfeatures()lib/ | +2 | 0 replies | |
| 6/8 | x86/fpu: Remove cpu_has_xfeatures()arch/ arch/ | +3 | 4 replies | |
| 7/8 | xor: Remove redundant X86_FEATURE_OSXSAVE checklib/ | +1 | 0 replies | |
| 8/8 | xor: Add AVX-512 optimized xor_gen()lib/ lib/ lib/ | +143 | 0 replies |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Christoph Hellwig | David Laight |
|---|---|---|
| 1/8 | A-b | |
| 2/8 | A-b | |
| 3/8 | A-b | |
| 4/8 | A-b | |
| 5/8 | A-b | |
| 6/8 | A-b | |
| 7/8 | R-b A-b | |
| 8/8 | R-b A-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 0/8] x86: Remove cpu_has_xfeatures() and add AVX-512 xor_gen()
This series consolidates and cleans up how the kernel handles CPU feature flags for AVX and AVX-512 when the underlying OS or hypervisor (if any) doesn't enable the required xstate features in XCR0.
Specifically, it makes the checks for xstate features be done in a single place at boot time for both UML and native x86, instead of everywhere kernel code wants to check for AVX or AVX-512 support.
Patch 8 then adds an AVX-512 optimized implementation of xor_gen() for RAID, which had been blocked on confusion around cpu_has_xfeatures() and its lack of implementation on UML.
Please consider this series for the x86 tree for 7.4.
Changed in v5:
- Replaced benchmark results with the new xor_benchmark
- Consolidated the vzeroupper in xor-avx512.c into one location
Changed in v4:
- Added missing vzeroupper instructions in xor-avx512.c
Changed in v3:
- Updated the implementation of fpu__init_system_xstate() as suggested by Borislav
- Added Acked-by tags
- Used "xor:" commit subject
Changed in v2:
- Made x86 clear the AVX* bits if FPU or XSAVE features are missing.
- Updated comment in x86 arch_xor_init().
- Updated commit message for the UML commit to clarify that checking XCR0 is standard practice in userspace
Eric Biggers (8):
x86/fpu: Check for missing AVX and AVX-512 xstate bits
um: Check for missing AVX and AVX-512 xstate bits
crypto: x86 - Stop using cpu_has_xfeatures() lib/crypto: x86: Stop using cpu_has_xfeatures() lib/crc: x86: Stop using cpu_has_xfeatures() x86/fpu: Remove cpu_has_xfeatures()
xor: Remove redundant X86_FEATURE_OSXSAVE check
xor: Add AVX-512 optimized xor_gen()
arch/um/kernel/um_arch.c | 78 ++++++++++++- arch/x86/crypto/aegis128-aesni-glue.c | 3 +- arch/x86/crypto/aesni-intel_glue.c | 7 +- arch/x86/crypto/aria_aesni_avx2_glue.c | 11 +- arch/x86/crypto/aria_aesni_avx_glue.c | 11 +- arch/x86/crypto/aria_gfni_avx512_glue.c | 11 +- arch/x86/crypto/camellia_aesni_avx2_glue.c | 11 +- arch/x86/crypto/camellia_aesni_avx_glue.c | 11 +- arch/x86/crypto/cast5_avx_glue.c | 7 +- arch/x86/crypto/cast6_avx_glue.c | 7 +- arch/x86/crypto/serpent_avx2_glue.c | 9 +- arch/x86/crypto/serpent_avx_glue.c | 7 +- arch/x86/crypto/sm4_aesni_avx2_glue.c | 11 +- arch/x86/crypto/sm4_aesni_avx_glue.c | 11 +- arch/x86/crypto/twofish_avx_glue.c | 6 +- arch/x86/include/asm/fpu/api.h | 9 -- arch/x86/kernel/fpu/xstate.c | 69 +++++------- lib/crc/x86/crc-pclmul-template.h | 6 +- lib/crypto/x86/blake2s.h | 4 +- lib/crypto/x86/chacha.h | 3 +- lib/crypto/x86/nh.h | 4 +- lib/crypto/x86/poly1305.h | 7 +- lib/crypto/x86/sha1.h | 4 +- lib/crypto/x86/sha256.h | 4 +- lib/crypto/x86/sha512.h | 3 +- lib/crypto/x86/sm3.h | 3 +- lib/raid/xor/Makefile | 2 +- lib/raid/xor/x86/xor-avx512.c | 122 +++++++++++++++++++++ lib/raid/xor/x86/xor_arch.h | 31 ++++-- 29 files changed, 276 insertions(+), 196 deletions(-) create mode 100644 lib/raid/xor/x86/xor-avx512.c
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
Signature · 1 line
2.55.0