From: Jamin Lin <jamin_lin@aspeedtech.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>,
"Cédric Le Goater" <clg@kaod.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Steven Lee" <steven_lee@aspeedtech.com>,
"Troy Lee" <leetroy@gmail.com>,
"Kane Chen" <kane_chen@aspeedtech.com>,
"Andrew Jeffery" <andrew@codeconstruct.com.au>,
"Joel Stanley" <joel@jms.id.au>, "Eric Blake" <eblake@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"open list:All patches CC here" <qemu-devel@nongnu.org>,
"open list:ASPEED BMCs" <qemu-arm@nongnu.org>
Cc: Jamin Lin <jamin_lin@aspeedtech.com>, Troy Lee <troy_lee@aspeedtech.com>
Subject: [PATCH v3 15/16] hw/misc/aspeed_hace: Enable the crypto command on the AST2700
Date: Tue, 11 Aug 2026 03:10:46 +0000 [thread overview]
Message-ID: <20260811031025.2784489-16-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20260811031025.2784489-1-jamin_lin@aspeedtech.com>
With direct/scatter-gather access, 64-bit DMA and AES-GCM all in place,
the AST2700 crypto engine is now fully modelled. Drop its temporary
interrupt-only workaround so the crypto command runs for real, like the
other HACE variants.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Kane Chen <kane_chen@aspeedtech.com>
---
include/hw/misc/aspeed_hace.h | 1 -
hw/misc/aspeed_hace.c | 15 +--------------
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/include/hw/misc/aspeed_hace.h b/include/hw/misc/aspeed_hace.h
index b5416b0cb5..9b0e7683fa 100644
--- a/include/hw/misc/aspeed_hace.h
+++ b/include/hw/misc/aspeed_hace.h
@@ -49,7 +49,6 @@ struct AspeedHACEClass {
uint32_t key_mask;
uint32_t hash_mask;
uint64_t nr_regs;
- bool raise_crypt_interrupt_workaround;
uint32_t src_hi_mask;
uint32_t dest_hi_mask;
uint32_t key_hi_mask;
diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c
index e455216dd4..0c53383903 100644
--- a/hw/misc/aspeed_hace.c
+++ b/hw/misc/aspeed_hace.c
@@ -1003,14 +1003,7 @@ static void aspeed_hace_write(void *opaque, hwaddr addr, uint64_t data,
break;
}
case R_CRYPT_CMD:
- /*
- * The AST2700 crypto engine needs 64-bit DMA and AES-GCM, which are
- * added later; until then it keeps the temporary workaround of only
- * raising the completion interrupt without running the command.
- */
- if (!ahc->raise_crypt_interrupt_workaround) {
- do_crypt_operation(s, data);
- }
+ do_crypt_operation(s, data);
/* Hardware raises the crypt interrupt once the command finishes. */
s->regs[R_STATUS] |= CRYPT_IRQ;
@@ -1214,12 +1207,6 @@ static void aspeed_ast2700_hace_class_init(ObjectClass *klass, const void *data)
ahc->dest_hi_mask = 0x00000003;
ahc->key_hi_mask = 0x00000003;
- /*
- * Currently, it does not support the CRYPT command. Instead, it only
- * sends an interrupt to notify the firmware that the crypt command
- * has completed. It is a temporary workaround.
- */
- ahc->raise_crypt_interrupt_workaround = true;
ahc->has_dma64 = true;
}
--
2.43.0
next prev parent reply other threads:[~2026-08-11 3:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 3:10 [PATCH v3 00/16] Support the ASPEED HACE crypto command Jamin Lin
2026-08-11 3:10 ` [PATCH v3 01/16] hw/misc/aspeed_hace: Support the crypto command in direct access mode Jamin Lin
2026-08-11 3:13 ` Kane Chen
2026-08-11 3:10 ` [PATCH v3 02/16] tests/qtest/aspeed-hace: Test the crypto command on the AST2500 Jamin Lin
2026-08-11 3:10 ` [PATCH v3 03/16] hw/misc/aspeed_hace: Support scatter-gather mode for the crypto command Jamin Lin
2026-08-11 3:16 ` Kane Chen
2026-08-11 3:10 ` [PATCH v3 04/16] hw/misc/aspeed_hace: Support the CTR " Jamin Lin
2026-08-11 3:10 ` [PATCH v3 05/16] tests/qtest/aspeed-hace: Test the crypto command on the AST2600 Jamin Lin
2026-08-11 3:15 ` Kane Chen
2026-08-11 3:10 ` [PATCH v3 06/16] tests/qtest/aspeed-hace: Test the crypto command on the AST1030 Jamin Lin
2026-08-11 3:10 ` [PATCH v3 07/16] crypto/cipher: Add GCM to QCryptoCipherMode Jamin Lin
2026-08-11 3:10 ` [PATCH v3 08/16] crypto/cipher: Add setaad/gettag for AEAD modes Jamin Lin
2026-08-11 3:10 ` [PATCH v3 09/16] crypto/cipher-gcrypt: Implement AES-GCM Jamin Lin
2026-08-11 3:10 ` [PATCH v3 10/16] crypto/cipher-nettle: " Jamin Lin
2026-08-11 3:10 ` [PATCH v3 11/16] crypto/cipher-gnutls: " Jamin Lin
2026-08-11 3:10 ` [PATCH v3 12/16] tests/unit/test-crypto-cipher: Test AES-GCM mode Jamin Lin
2026-08-11 3:10 ` [PATCH v3 13/16] hw/misc/aspeed_hace: Support 64-bit DMA for the crypto command Jamin Lin
2026-08-11 3:10 ` [PATCH v3 14/16] hw/misc/aspeed_hace: Support the AES-GCM mode " Jamin Lin
2026-08-11 4:26 ` Cédric Le Goater
2026-08-11 5:22 ` Jamin Lin
2026-08-11 3:10 ` Jamin Lin [this message]
2026-08-11 3:10 ` [PATCH v3 16/16] tests/qtest/aspeed-hace: Test the crypto command on the AST2700 Jamin Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260811031025.2784489-16-jamin_lin@aspeedtech.com \
--to=jamin_lin@aspeedtech.com \
--cc=andrew@codeconstruct.com.au \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=clg@kaod.org \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=joel@jms.id.au \
--cc=kane_chen@aspeedtech.com \
--cc=leetroy@gmail.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=steven_lee@aspeedtech.com \
--cc=troy_lee@aspeedtech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.