From: Harald Freudenberger <freude@linux.ibm.com>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: richard.henderson@linaro.org, david@kernel.org, thuth@redhat.com,
berrange@redhat.com, qemu-s390x@nongnu.org,
qemu-devel@nongnu.org, linux-s390@vger.kernel.org,
dengler@linux.ibm.com, borntraeger@linux.ibm.com,
fcallies@linux.ibm.com, cohuck@redhat.com
Subject: Re: [PATCH v12 17/17] tests/tcg/s390x: Add tests for CPACF instructions
Date: Thu, 23 Jul 2026 14:06:33 +0200 [thread overview]
Message-ID: <8068c6b81fca91a619c3ea9b116ad5c8@linux.ibm.com> (raw)
In-Reply-To: <33187980-d8d8-43f4-a138-34c67fa63d8b@linux.ibm.com>
On 2026-07-14 14:01, Ilya Leoshkevich wrote:
> On 7/10/26 17:29, Harald Freudenberger wrote:
>> Add simple tests for the CPACF instructions implemented:
>> - kdsa - minimal as only query is implemented
>> - kimd - query, sha256, sha512
>> - klmd - query, sha256, sha512
>> - km - query, aes 128, 192, 256 with clear and prot key
>> - kmac - minimal as only query is implemented
>> - kmc - query, aes 128, 192, 256 with clear and prot key
>> - kmctr - query, aes 128, 192, 256 with clear and prot key
>> - pcc - query, xts aes 128, 256 and prot key xts aes 128, 256
>> - prno - query, trng
>> No test for pckmo as this is a privileged instruction.
>> No test for kma, kmf, kmo as these instructions are currently
>> not implemented at all.
>>
>> Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
>> ---
>> target/s390x/tcg/cpacf.h | 7 +
>> tests/tcg/s390x/Makefile.target | 9 +
>> tests/tcg/s390x/cpacf-kdsa.c | 58 ++++
>> tests/tcg/s390x/cpacf-kimd.c | 166 +++++++++
>> tests/tcg/s390x/cpacf-klmd.c | 206 +++++++++++
>> tests/tcg/s390x/cpacf-km.c | 590
>> ++++++++++++++++++++++++++++++++
>> tests/tcg/s390x/cpacf-kmac.c | 58 ++++
>> tests/tcg/s390x/cpacf-kmc.c | 351 +++++++++++++++++++
>> tests/tcg/s390x/cpacf-kmctr.c | 360 +++++++++++++++++++
>> tests/tcg/s390x/cpacf-pcc.c | 245 +++++++++++++
>> tests/tcg/s390x/cpacf-prno.c | 131 +++++++
>> tests/tcg/s390x/cpacf.h | 571
>> +++++++++++++++++++++++++++++++
>> 12 files changed, 2752 insertions(+)
>> create mode 100644 tests/tcg/s390x/cpacf-kdsa.c
>> create mode 100644 tests/tcg/s390x/cpacf-kimd.c
>> create mode 100644 tests/tcg/s390x/cpacf-klmd.c
>> create mode 100644 tests/tcg/s390x/cpacf-km.c
>> create mode 100644 tests/tcg/s390x/cpacf-kmac.c
>> create mode 100644 tests/tcg/s390x/cpacf-kmc.c
>> create mode 100644 tests/tcg/s390x/cpacf-kmctr.c
>> create mode 100644 tests/tcg/s390x/cpacf-pcc.c
>> create mode 100644 tests/tcg/s390x/cpacf-prno.c
>> create mode 100644 tests/tcg/s390x/cpacf.h
>
> I get failures when running these on a real z17, for example:
>
> $ ./cpacf-kdsa
> test_kdsa_query failed
> cpacf-kdsa: 1 failures
Ok, I only tested on qemu. But of course you are right, it should
work fine on a real machine also. Will check this ...
Oh maybe one thing: query works with a fixed bitfield of subfunctions
which are supported - by the QEMU CPACF implementation. So a real
query may result in a lot of more subfunctions enabled in the result
bitfield and thus the compare will fail.
prev parent reply other threads:[~2026-07-23 12:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 15:28 [PATCH v12 00/17] target/s390x: Extend qemu CPACF support Harald Freudenberger
2026-07-10 15:28 ` [PATCH v12 01/17] target/s390x: Rework s390 cpacf implementations Harald Freudenberger
2026-07-10 15:28 ` [PATCH v12 02/17] target/s390x: Move cpacf sha512 code into a new file Harald Freudenberger
2026-07-10 15:28 ` [PATCH v12 03/17] target/s390x: Support cpacf sha256 Harald Freudenberger
2026-07-10 15:28 ` [PATCH v12 04/17] crypto: Add aes-helpers file to support some AES modes Harald Freudenberger
2026-07-14 11:45 ` Ilya Leoshkevich
2026-07-14 14:16 ` Daniel P. Berrangé
2026-07-10 15:28 ` [PATCH v12 05/17] target/s390x: Support AES ECB for cpacf km instruction Harald Freudenberger
2026-07-14 11:49 ` Ilya Leoshkevich
2026-07-10 15:28 ` [PATCH v12 06/17] target/s390x: Support AES CBC for cpacf kmc instruction Harald Freudenberger
2026-07-10 15:28 ` [PATCH v12 07/17] target/s390x: Support AES CTR for cpacf kmctr instruction Harald Freudenberger
2026-07-10 15:28 ` [PATCH v12 08/17] target/s390x: Minimal AES XTS support for cpacf pcc instruction Harald Freudenberger
2026-07-10 15:28 ` [PATCH v12 09/17] target/s390x: Support AES XTS for cpacf km instruction Harald Freudenberger
2026-07-10 15:28 ` [PATCH v12 10/17] target/s390x: Base support for cpacf protected keys and pckmo Harald Freudenberger
2026-07-10 15:28 ` [PATCH v12 11/17] target/s390x: Support protected key AES ECB for cpacf km instruction Harald Freudenberger
2026-07-10 15:28 ` [PATCH v12 12/17] target/s390x: Support protected key AES CBC for cpacf kmc instruction Harald Freudenberger
2026-07-10 15:28 ` [PATCH v12 13/17] target/s390x: Support protected key AES CTR for cpacf kmctr instruction Harald Freudenberger
2026-07-10 15:29 ` [PATCH v12 14/17] target/s390x: Minimal protected key AES XTS support for cpacf pcc instruction Harald Freudenberger
2026-07-10 15:29 ` [PATCH v12 15/17] target/s390x: Support protected key AES XTS for cpacf km instruction Harald Freudenberger
2026-07-10 15:29 ` [PATCH v12 16/17] docs/s390: Document CPACF instructions support Harald Freudenberger
2026-07-14 12:07 ` Ilya Leoshkevich
2026-07-10 15:29 ` [PATCH v12 17/17] tests/tcg/s390x: Add tests for CPACF instructions Harald Freudenberger
2026-07-14 12:01 ` Ilya Leoshkevich
2026-07-23 12:06 ` Harald Freudenberger [this message]
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=8068c6b81fca91a619c3ea9b116ad5c8@linux.ibm.com \
--to=freude@linux.ibm.com \
--cc=berrange@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@kernel.org \
--cc=dengler@linux.ibm.com \
--cc=fcallies@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.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.