mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Backport AVX2 AES-GCM implementation from BoringSSL
This uses the AVX2 versions of the AESENC and PCLMULQDQ instructions; on Zen 3 this provides an up to 80% performance improvement. Original source: https://github.com/google/boringssl/blob/d5440dd2c2c500ac2d3bba4afec47a054b4d99ae/gen/bcm/aes-gcm-avx2-x86_64-linux.S See the original BoringSSL commit at https://github.com/google/boringssl/commit/3b6e1be4391d96e81cee022f77f7bab85d51cf4e. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <robn@despairlabs.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Attila Fülöp <attila@fueloep.org> Signed-off-by: Joel Low <joel@joelsplace.sg> Closes #17058
This commit is contained in:
committed by
Brian Behlendorf
parent
885d929cf8
commit
bb9225ea86
@@ -597,6 +597,32 @@ zfs_movbe_available(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if VAES instruction set is available
|
||||
*/
|
||||
static inline boolean_t
|
||||
zfs_vaes_available(void)
|
||||
{
|
||||
#if defined(X86_FEATURE_VAES)
|
||||
return (!!boot_cpu_has(X86_FEATURE_VAES));
|
||||
#else
|
||||
return (B_FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if VPCLMULQDQ instruction set is available
|
||||
*/
|
||||
static inline boolean_t
|
||||
zfs_vpclmulqdq_available(void)
|
||||
{
|
||||
#if defined(X86_FEATURE_VPCLMULQDQ)
|
||||
return (!!boot_cpu_has(X86_FEATURE_VPCLMULQDQ));
|
||||
#else
|
||||
return (B_FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if SHA_NI instruction set is available
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user