@samitouri / QOSamiQemu / commits / d030f3cabe

tests/qtest/aspeed-hace: Test the crypto command on the AST1030

The AST1030 reuses the AST2600 crypto engine, so it drives the same scatter-gather transfers and supports the same ECB/CBC/CTR modes. Reuse the crypto known-answer tests to cover it, registering the AST1030 with the same modes and scatter-gather flag as the AST2600. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Kane Chen <kane_chen@aspeedtech.com> Link: https://lore.kernel.org/qemu-devel/20260811060115.1849266-7-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>

Jamin Lin committed Aug 11, 2026 at 06:01 UTC d030f3cabe74e0b3205b417ca061c3ac6e7a4334
1 file changed +6
tests/qtest/aspeed_hace-test.c
+6
@@ -210,6 +210,12 @@ int main(int argc, char **argv)
210 qtest_add_func("ast1030/hace/sha384_accum", test_sha384_accum_ast1030);
211 qtest_add_func("ast1030/hace/sha256_accum", test_sha256_accum_ast1030);
212
213 + /* The AST1030 reuses the AST2600 crypto engine (scatter-gather, CTR). */
214 + aspeed_add_crypto_tests("ast1030", "-machine ast1030-evb", 0x7e6d0000,
215 + 0x00000000,
216 + CRYPT_MODE_ECB | CRYPT_MODE_CBC | CRYPT_MODE_CTR,
217 + true);
218 +
219 qtest_add_func("ast2600/hace/addresses", test_addresses_ast2600);
220 qtest_add_func("ast2600/hace/sha512", test_sha512_ast2600);
221 qtest_add_func("ast2600/hace/sha384", test_sha384_ast2600);