[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/19] s390x/tcg: Implement CIPHER MESSAGE WITH AUTHENTICATION (KM
From: |
Cornelia Huck |
Subject: |
[PULL 19/19] s390x/tcg: Implement CIPHER MESSAGE WITH AUTHENTICATION (KMA) |
Date: |
Fri, 2 Oct 2020 14:11:18 +0200 |
From: David Hildenbrand <david@redhat.com>
As with the other crypto functions, we only implement subcode 0 (query)
and no actual encryption/decryption. We now implement S390_FEAT_MSA_EXT_8.
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200928122717.30586-10-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
target/s390x/gen-features.c | 1 +
target/s390x/insn-data.def | 1 +
target/s390x/translate.c | 7 +++++++
3 files changed, 9 insertions(+)
diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
index 02ec0a673517..a6ec918e901e 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -719,6 +719,7 @@ static uint16_t qemu_MAX[] = {
/* features introduced after the z13 */
S390_FEAT_INSTRUCTION_EXEC_PROT,
S390_FEAT_MISC_INSTRUCTION_EXT2,
+ S390_FEAT_MSA_EXT_8,
};
/****** END FEATURE DEFS ******/
diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def
index fc83a6ec32a4..d3bcdfd67b3c 100644
--- a/target/s390x/insn-data.def
+++ b/target/s390x/insn-data.def
@@ -982,6 +982,7 @@
D(0xb92d, KMCTR, RRF_b, MSA4, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_KMCTR)
D(0xb92e, KM, RRE, MSA, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_KM)
D(0xb92f, KMC, RRE, MSA, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_KMC)
+ D(0xb929, KMA, RRF_b, MSA8, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_KMA)
D(0xb93c, PPNO, RRE, MSA5, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_PPNO)
D(0xb93e, KIMD, RRE, MSA, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_KIMD)
D(0xb93f, KLMD, RRE, MSA, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_KLMD)
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index bcc65893e4ff..ac10f42f1045 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -2710,6 +2710,12 @@ static DisasJumpType op_msa(DisasContext *s, DisasOps *o)
TCGv_i32 t_r1, t_r2, t_r3, type;
switch (s->insn->data) {
+ case S390_FEAT_TYPE_KMA:
+ if (r3 == r1 || r3 == r2) {
+ gen_program_exception(s, PGM_SPECIFICATION);
+ return DISAS_NORETURN;
+ }
+ /* FALL THROUGH */
case S390_FEAT_TYPE_KMCTR:
if (r3 & 1 || !r3) {
gen_program_exception(s, PGM_SPECIFICATION);
@@ -6154,6 +6160,7 @@ enum DisasInsnEnum {
#define FAC_MSA3 S390_FEAT_MSA_EXT_3 /* msa-extension-3 facility */
#define FAC_MSA4 S390_FEAT_MSA_EXT_4 /* msa-extension-4 facility */
#define FAC_MSA5 S390_FEAT_MSA_EXT_5 /* msa-extension-5 facility */
+#define FAC_MSA8 S390_FEAT_MSA_EXT_8 /* msa-extension-8 facility */
#define FAC_ECT S390_FEAT_EXTRACT_CPU_TIME
#define FAC_PCI S390_FEAT_ZPCI /* z/PCI facility */
#define FAC_AIS S390_FEAT_ADAPTER_INT_SUPPRESSION
--
2.25.4
- [PULL 09/19] s390x/tcg: Implement MONITOR CALL, (continued)
- [PULL 09/19] s390x/tcg: Implement MONITOR CALL, Cornelia Huck, 2020/10/02
- [PULL 10/19] vfio-ccw: plug memory leak while getting region info, Cornelia Huck, 2020/10/02
- [PULL 13/19] s390x/tcg: Implement SUBTRACT HALFWORD (SGH), Cornelia Huck, 2020/10/02
- [PULL 11/19] s390x/cpumodel: S390_FEAT_MISC_INSTRUCTION_EXT -> S390_FEAT_MISC_INSTRUCTION_EXT2, Cornelia Huck, 2020/10/02
- [PULL 12/19] s390x/tcg: Implement ADD HALFWORD (AGH), Cornelia Huck, 2020/10/02
- [PULL 14/19] s390x/tcg: Implement MULTIPLY (MG, MGRK), Cornelia Huck, 2020/10/02
- [PULL 15/19] s390x/tcg: Implement MULTIPLY HALFWORD (MGH), Cornelia Huck, 2020/10/02
- [PULL 16/19] s390x/tcg: Implement BRANCH INDIRECT ON CONDITION (BIC), Cornelia Huck, 2020/10/02
- [PULL 17/19] s390x/tcg: Implement MULTIPLY SINGLE (MSC, MSGC, MSGRKC, MSRKC), Cornelia Huck, 2020/10/02
- [PULL 18/19] s390x/tcg: We support Miscellaneous-Instruction-Extensions Facility 2, Cornelia Huck, 2020/10/02
- [PULL 19/19] s390x/tcg: Implement CIPHER MESSAGE WITH AUTHENTICATION (KMA),
Cornelia Huck <=
- Re: [PULL 00/19] s390x changes, Peter Maydell, 2020/10/02