From 57357322e4bd35c42816c769e36f39af11fc3ddc Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 5 Jun 2023 21:57:55 +0300 Subject: host/include/ppc: Implement aes-round.h Detect CRYPTO in cpuinfo; implement the accel hooks. Reviewed-by: Daniel Henrique Barboza Signed-off-by: Richard Henderson --- util/cpuinfo-ppc.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util') 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; + } } } -- cgit v1.1