linux-user/sparc: Report HWCAP_SPARC_CRYPTO for crypto CPU feature

Set HWCAP_SPARC_CRYPTO in AT_HWCAP like Linux does on real hardware
that supports it. qemu-sparc64 defaults to "TI UltraSparc II",
which has no crypto feature, so it must be enabled explicitly,
e.g. -cpu TI-UltraSparc-II,+crypto

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Stian Halseth <stian@itx.no>
Message-ID: <20261028113816.1651212-3-stian@itx.no>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
This commit is contained in:
Stian Halseth authored and Mark Cave-Ayland committed 2026-11-01 14:01:53 +00:00
1 parent 6d085130b2
commit c5b2f2334e
1 file changed
+1
+1
View File
@@ -90,6 +90,7 @@ abi_ulong get_elf_hwcap(CPUState *cs)
r |= features & CPU_FEATURE_FMAF ? HWCAP_SPARC_FMAF : 0;
r |= features & CPU_FEATURE_VIS3 ? HWCAP_SPARC_VIS3 : 0;
r |= features & CPU_FEATURE_IMA ? HWCAP_SPARC_IMA : 0;
r |= features & CPU_FEATURE_CRYPTO ? HWCAP_SPARC_CRYPTO : 0;
#endif
return r;