With the crypto feature, guests treat the CPU as a T4 or later. On those CPUs a block-initializing store (ASI 0xe2 and the other twin ASIs) to the start of a 32-byte block also zeroes the rest of the block. glibc's niagara4 memset and Linux's NG4memset depend on it, and OpenSSL's T4 AES code uses the FP form (stdfa). Patch 1 models this for both forms; patch 2 then reports HWCAP_SPARC_CRYPTO in linux-user.
v2: - Test the alignment with TCG_COND_TSTNE (Richard) - Skip offset 0 for 8-byte stores, which write it themselves (Richard). stba/stha/stwa at offset 0 still zero it: a T4 zeroes the rest of the first doubleword for those too. - Rebased on master, now that the crypto instructions are in v1: https://lore.kernel.org/qemu-devel/[email protected]/ Stian Halseth (2): target/sparc: Model block-initializing stores linux-user/sparc: Report HWCAP_SPARC_CRYPTO for crypto CPU feature linux-user/sparc/elfload.c | 1 + target/sparc/translate.c | 43 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) -- 2.43.0
