On 17.06.26 11:48, Harald Freudenberger wrote:
Support CPACF pcc subfunctions PCC-Compute-XTS-Parameter-AES-128
and PCC-Compute-XTS-Parameter-AES-128 but only for the special
case block sequential number is 0. However, this covers the s390
AES XTS implementation in the Linux kernel and Libica and thus
also Opencryptoki clear key via Libica.
Signed-off-by: Harald Freudenberger <[email protected]>
Tested-by: Holger Dengler <[email protected]>
---
target/s390x/gen-features.c | 2 +
target/s390x/tcg/cpacf.h | 2 +
target/s390x/tcg/cpacf_aes.c | 71 ++++++++++++++++++++++++++++++++
target/s390x/tcg/crypto_helper.c | 20 +++++++++
4 files changed, 95 insertions(+)
[ snip ]
diff --git a/target/s390x/tcg/cpacf_aes.c b/target/s390x/tcg/cpacf_aes.c
index e200a9a87a..43c556f31b 100644
--- a/target/s390x/tcg/cpacf_aes.c
+++ b/target/s390x/tcg/cpacf_aes.c
@@ -16,6 +16,13 @@
#include "crypto/aes.h"
#include "cpacf.h"
+/* #define DEBUG_HELPER */
+#ifdef DEBUG_HELPER
+#define HELPER_LOG(x...) qemu_log(x)
+#else
+#define HELPER_LOG(x...)
+#endif
+
You never use this... Seems to be unrelated to this commit so put this
in its own commit if you need it later.
static void aes_read_block(CPUS390XState *env, const int mmu_idx,
uint64_t addr, uint8_t *a, uintptr_t ra)
{
[ snip ]