From fe31cf5b83383cbc02f5bc31411367c0128f2df6 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 29 Jul 2016 15:50:30 +0200 Subject: Crypto: Use Hyper-V AES-NI detection workaround when displaying AES hardware availability in GUI. --- src/Crypto/Aes_hw_cpu.asm | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src/Crypto/Aes_hw_cpu.asm') diff --git a/src/Crypto/Aes_hw_cpu.asm b/src/Crypto/Aes_hw_cpu.asm index faaba4f3..edc20b29 100644 --- a/src/Crypto/Aes_hw_cpu.asm +++ b/src/Crypto/Aes_hw_cpu.asm @@ -286,17 +286,20 @@ ; byte is_aes_hw_cpu_supported (); - export_function is_aes_hw_cpu_supported - push %[R]bx - - mov eax, 1 - cpuid - mov eax, ecx - shr eax, 25 - and eax, 1 - - pop %[R]bx - ret +; We comment this since we have an alternative C implementation +; that supports Hyper-V detection workaround +; +; export_function is_aes_hw_cpu_supported +; push %[R]bx +; +; mov eax, 1 +; cpuid +; mov eax, ecx +; shr eax, 25 +; and eax, 1 +; +; pop %[R]bx +; ret ; void aes_hw_cpu_decrypt (const byte *ks, byte *data); -- cgit v1.2.3