aboutsummaryrefslogtreecommitdiffstats
path: root/module/icp/include
diff options
context:
space:
mode:
authorAttila Fülöp <[email protected]>2020-03-17 18:24:38 +0100
committerGitHub <[email protected]>2020-03-17 10:24:38 -0700
commit5b3b79559c3206ea5916cbdab72b88344aa6e9a2 (patch)
treee05419340a03581a05f494e2b16c9901acd713f1 /module/icp/include
parenta57d3d45d6efdff935421e2ef3f97e3dc089d93d (diff)
ICP: gcm-avx: Support architectures lacking the MOVBE instruction
There are a couple of x86_64 architectures which support all needed features to make the accelerated GCM implementation work but the MOVBE instruction. Those are mainly Intel Sandy- and Ivy-Bridge and AMD Bulldozer, Piledriver, and Steamroller. By using MOVBE only if available and replacing it with a MOV followed by a BSWAP if not, those architectures now benefit from the new GCM routines and performance is considerably better compared to the original implementation. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Adam D. Moss <[email protected]> Signed-off-by: Attila Fülöp <[email protected]> Followup #9749 Closes #10029
Diffstat (limited to 'module/icp/include')
-rw-r--r--module/icp/include/modes/modes.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/icp/include/modes/modes.h b/module/icp/include/modes/modes.h
index 9396eab5c..57a211ccf 100644
--- a/module/icp/include/modes/modes.h
+++ b/module/icp/include/modes/modes.h
@@ -40,8 +40,9 @@ extern "C" {
* anyhow.
*/
#if defined(__x86_64__) && defined(HAVE_AVX) && \
- defined(HAVE_AES) && defined(HAVE_PCLMULQDQ) && defined(HAVE_MOVBE)
+ defined(HAVE_AES) && defined(HAVE_PCLMULQDQ)
#define CAN_USE_GCM_ASM
+extern boolean_t gcm_avx_can_use_movbe;
#endif
#define ECB_MODE 0x00000002