From d6a2443696c5b34fb20879e899bf823d6168b068 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 1 Jun 2023 23:58:52 -0700 Subject: host/include/i386: Implement aes-round.h Detect AES in cpuinfo; implement the accel hooks. Signed-off-by: Richard Henderson --- util/cpuinfo-i386.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'util/cpuinfo-i386.c') diff --git a/util/cpuinfo-i386.c b/util/cpuinfo-i386.c index ab6143d9e7..3a7b7e0ad1 100644 --- a/util/cpuinfo-i386.c +++ b/util/cpuinfo-i386.c @@ -40,6 +40,9 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info |= (c & bit_MOVBE ? CPUINFO_MOVBE : 0); info |= (c & bit_POPCNT ? CPUINFO_POPCNT : 0); + /* Our AES support requires PSHUFB as well. */ + info |= ((c & bit_AES) && (c & bit_SSSE3) ? CPUINFO_AES : 0); + /* For AVX features, we must check available and usable. */ if ((c & bit_AVX) && (c & bit_OSXSAVE)) { unsigned bv = xgetbv_low(0); -- cgit 1.4.1