diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-06-05 21:57:55 +0300 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-07-08 07:30:17 +0100 |
commit | 57357322e4bd35c42816c769e36f39af11fc3ddc (patch) | |
tree | 448c770285c43712978d071d179a95a5ef0826fc /util | |
parent | 8d97f28e368be8b6248a363792a2cd0f9e9ddf6a (diff) | |
download | qemu-57357322e4bd35c42816c769e36f39af11fc3ddc.zip qemu-57357322e4bd35c42816c769e36f39af11fc3ddc.tar.gz qemu-57357322e4bd35c42816c769e36f39af11fc3ddc.tar.bz2 |
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>
Diffstat (limited to 'util')
-rw-r--r-- | util/cpuinfo-ppc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/cpuinfo-ppc.c b/util/cpuinfo-ppc.c index d95adc8..7212afa 100644 --- a/util/cpuinfo-ppc.c +++ b/util/cpuinfo-ppc.c @@ -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; + } } } |