mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
simd: detect and surface support for Intel SHA512 extensions
Recent Intel CPUs (starting with Arrow Lake and Lunar Lake) include new vectorised SHA512 instructions. Detect them and make them available to the rest of the system. Note the internal name "sha512ext". This is to disambiguate from other uses of "sha512". Sponsored-by: TrueNAS Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Attila Fülöp <attila@fueloep.org> Signed-off-by: Rob Norris <rob.norris@truenas.com> Closes #18233
This commit is contained in:
committed by
Brian Behlendorf
parent
6495dafd58
commit
3547a358fd
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2016 Gvozden Neskovic <neskovic@compeng.uni-frankfurt.de>.
|
||||
* Copyright (c) 2026, TrueNAS.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -623,6 +624,19 @@ zfs_vpclmulqdq_available(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if SHA512 instructions are available
|
||||
*/
|
||||
static inline boolean_t
|
||||
zfs_sha512ext_available(void)
|
||||
{
|
||||
#if defined(X86_FEATURE_SHA512)
|
||||
return (!!boot_cpu_has(X86_FEATURE_SHA512));
|
||||
#else
|
||||
return (B_FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if SHA_NI instruction set is available
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user