Linux s390 Architecture development
 help / color / mirror / Atom feed
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 v13 01/18] target/s390x: Rework s390 cpacf implementations
Date: Wed, 05 Aug 2026 09:52:29 +0200	[thread overview]
Message-ID: <50bc5c3447f43d6df3e4329dae8f176f@linux.ibm.com> (raw)
In-Reply-To: <59cb2b9b-06ed-49a9-bf54-0921e25d275a@linux.ibm.com>

On 2026-08-05 00:23, Ilya Leoshkevich wrote:
> On 8/3/26 18:12, Harald Freudenberger wrote:
>> Fix missing parts for MSA 9 kdsa and rework the cpacf handling code
>> so that further extensions can be made in a clean and structured way.
>> 
>> Introduce a new header file to hold defines, structs and function
>> prototypes around s390 cpacf. Use the cpcaf function defines in the
>> existing code.
>> 
>> Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
>> Tested-by: Holger Dengler <dengler@linux.ibm.com>
>> Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
>> Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
>> ---
>>   target/s390x/tcg/cpacf.h         | 226 
>> +++++++++++++++++++++++++++++++
>>   target/s390x/tcg/crypto_helper.c |  90 ++++++++++--
>>   target/s390x/tcg/insn-data.h.inc |   1 +
>>   target/s390x/tcg/translate.c     |   2 +
>>   4 files changed, 306 insertions(+), 13 deletions(-)
>>   create mode 100644 target/s390x/tcg/cpacf.h
>> 
>> diff --git a/target/s390x/tcg/cpacf.h b/target/s390x/tcg/cpacf.h
>> new file mode 100644
>> index 0000000000..49496d39ed
>> --- /dev/null
>> +++ b/target/s390x/tcg/cpacf.h
> 
> [...]
> 
>> +/*
>> + * Function codes for the PCKMO instruction
>> + */
>> +#define CPACF_PCKMO_QUERY                      0x00
>> +#define CPACF_PCKMO_ENC_DES_KEY                0x01
>> +#define CPACF_PCKMO_ENC_TDES_128_KEY           0x02
>> +#define CPACF_PCKMO_ENC_TDES_192_KEY           0x03
>> +#define CPACF_PCKMO_ENC_AES_128_KEY            0x12
>> +#define CPACF_PCKMO_ENC_AES_192_KEY            0x13
>> +#define CPACF_PCKMO_ENC_AES_256_KEY            0x14
>> +#define CPACF_PCKMO_ENC_AES_XTS_128_DOUBLE_KEY 0x14
> 
> 0x14 repeats twice, should it be 0x15?
> 
> [...]

Yes, the double should be a 0x15. See kernel header file
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/s390/include/asm/cpacf.h

  reply	other threads:[~2026-08-05  7:52 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 16:12 [PATCH v13 00/18] target/s390x: Extend qemu CPACF support Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 01/18] target/s390x: Rework s390 cpacf implementations Harald Freudenberger
2026-08-04 22:23   ` Ilya Leoshkevich
2026-08-05  7:52     ` Harald Freudenberger [this message]
2026-08-03 16:12 ` [PATCH v13 02/18] target/s390x: Move cpacf sha512 code into a new file Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 03/18] target/s390x: Support cpacf sha256 Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 04/18] target/s390x: Add helper functions for copy memory to and from guest Harald Freudenberger
2026-08-04 21:55   ` Ilya Leoshkevich
2026-08-03 16:12 ` [PATCH v13 05/18] crypto: Add aes-helpers file to support some AES modes Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 06/18] target/s390x: Support AES ECB for cpacf km instruction Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 07/18] target/s390x: Support AES CBC for cpacf kmc instruction Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 08/18] target/s390x: Support AES CTR for cpacf kmctr instruction Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 09/18] target/s390x: Minimal AES XTS support for cpacf pcc instruction Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 10/18] target/s390x: Support AES XTS for cpacf km instruction Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 11/18] target/s390x: Base support for cpacf protected keys and pckmo Harald Freudenberger
2026-08-04 22:00   ` Ilya Leoshkevich
2026-08-05  8:10     ` Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 12/18] target/s390x: Support protected key AES ECB for cpacf km instruction Harald Freudenberger
2026-08-04 22:48   ` Ilya Leoshkevich
2026-08-05  8:28     ` Harald Freudenberger
2026-08-05 11:17       ` Ilya Leoshkevich
2026-08-03 16:12 ` [PATCH v13 13/18] target/s390x: Support protected key AES CBC for cpacf kmc instruction Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 14/18] target/s390x: Support protected key AES CTR for cpacf kmctr instruction Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 15/18] target/s390x: Minimal protected key AES XTS support for cpacf pcc instruction Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 16/18] target/s390x: Support protected key AES XTS for cpacf km instruction Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 17/18] docs/s390: Document CPACF instructions support Harald Freudenberger
2026-08-03 16:12 ` [PATCH v13 18/18] tests/tcg/s390x: Add tests for CPACF instructions Harald Freudenberger

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=50bc5c3447f43d6df3e4329dae8f176f@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox