host/include/ppc: Implement aes-round.h

Detect CRYPTO in cpuinfo; implement the accel hooks.

Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2023-06-05 21:57:55 +03:00
parent 8d97f28e36
commit 57357322e4
4 changed files with 192 additions and 0 deletions

View file

@ -48,6 +48,14 @@ unsigned __attribute__((constructor)) cpuinfo_init(void)
/* We only care about the portion of VSX that overlaps Altivec. */
if (hwcap & PPC_FEATURE_HAS_VSX) {
info |= CPUINFO_VSX;
/*
* We use VSX especially for little-endian, but we should
* always have both anyway, since VSX came with Power7
* and crypto came with Power8.
*/
if (hwcap2 & PPC_FEATURE2_HAS_VEC_CRYPTO) {
info |= CPUINFO_CRYPTO;
}
}
}