Commit c5b2f2334e for qemu.org

commit c5b2f2334ecbfff8feb69aa2d7e33083784c938f
Author: Stian Halseth <stian@itx.no>
Date:   Wed Oct 28 12:38:16 2026 +0100

    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>

diff --git a/linux-user/sparc/elfload.c b/linux-user/sparc/elfload.c
index 181f1e00b5..0412741285 100644
--- a/linux-user/sparc/elfload.c
+++ b/linux-user/sparc/elfload.c
@@ -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;