|
Pablo Greco |
e6a3ae |
From 2933aa1a4c5ba743e951811080e4e1a44151e165 Mon Sep 17 00:00:00 2001
|
|
Pablo Greco |
e6a3ae |
From: David Hildenbrand <david@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Date: Wed, 22 May 2019 08:03:57 +0100
|
|
Pablo Greco |
e6a3ae |
Subject: [PATCH 05/12] s390x/cpumodel: msa9 facility
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
RH-Author: David Hildenbrand <david@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Message-id: <20190522080402.20173-6-david@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Patchwork-id: 88161
|
|
Pablo Greco |
e6a3ae |
O-Subject: [RHEL8.1 qemu-kvm PATCH v2 05/10] s390x/cpumodel: msa9 facility
|
|
Pablo Greco |
e6a3ae |
Bugzilla: 1660912
|
|
Pablo Greco |
e6a3ae |
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
|
|
Pablo Greco |
e6a3ae |
RH-Acked-by: Jens Freimann <jfreimann@redhat.com>
|
|
Pablo Greco |
e6a3ae |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
Provide the MSA9 facility (stfle.155). This also contains pckmo
|
|
Pablo Greco |
e6a3ae |
subfunctions for key wrapping. Keep them in a separate group to disable
|
|
Pablo Greco |
e6a3ae |
those as a block if necessary. This is for example needed when disabling
|
|
Pablo Greco |
e6a3ae |
key wrapping via the HMC.
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
|
|
Pablo Greco |
e6a3ae |
Message-Id: <20190429090250.7648-5-borntraeger@de.ibm.com>
|
|
Pablo Greco |
e6a3ae |
Reviewed-by: David Hildenbrand <david@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
|
Pablo Greco |
e6a3ae |
(cherry picked from commit 5dacbe23d23c7f0395fa0e65ff1698f632846714)
|
|
Pablo Greco |
e6a3ae |
Signed-off-by: David Hildenbrand <david@redhat.com>
|
|
Pablo Greco |
e6a3ae |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
Pablo Greco |
e6a3ae |
---
|
|
Pablo Greco |
e6a3ae |
target/s390x/cpu_features.c | 32 +++++++++++++++++++++++++++++++
|
|
Pablo Greco |
e6a3ae |
target/s390x/cpu_features.h | 1 +
|
|
Pablo Greco |
e6a3ae |
target/s390x/cpu_features_def.h | 31 ++++++++++++++++++++++++++++++
|
|
Pablo Greco |
e6a3ae |
target/s390x/cpu_models.c | 2 ++
|
|
Pablo Greco |
e6a3ae |
target/s390x/gen-features.c | 42 +++++++++++++++++++++++++++++++++++++++++
|
|
Pablo Greco |
e6a3ae |
target/s390x/kvm.c | 6 ++++++
|
|
Pablo Greco |
e6a3ae |
6 files changed, 114 insertions(+)
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
|
|
Pablo Greco |
e6a3ae |
index bbd8902..154e2bb 100644
|
|
Pablo Greco |
e6a3ae |
--- a/target/s390x/cpu_features.c
|
|
Pablo Greco |
e6a3ae |
+++ b/target/s390x/cpu_features.c
|
|
Pablo Greco |
e6a3ae |
@@ -108,6 +108,7 @@ static const S390FeatDef s390_features[] = {
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("irbm", S390_FEAT_TYPE_STFL, 145, "Insert-reference-bits-multiple facility"),
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("msa8-base", S390_FEAT_TYPE_STFL, 146, "Message-security-assist-extension-8 facility (excluding subfunctions)"),
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("cmmnt", S390_FEAT_TYPE_STFL, 147, "CMM: ESSA-enhancement (no translate) facility"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("msa9-base", S390_FEAT_TYPE_STFL, 155, "Message-security-assist-extension-9 facility (excluding subfunctions)"),
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("etoken", S390_FEAT_TYPE_STFL, 156, "Etoken facility"),
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
/* SCLP SCCB Byte 80 - 98 (bit numbers relative to byte-80) */
|
|
Pablo Greco |
e6a3ae |
@@ -242,6 +243,11 @@ static const S390FeatDef s390_features[] = {
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("pckmo-aes-128", S390_FEAT_TYPE_PCKMO, 18, "PCKMO Encrypted-AES-128-Key"),
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("pckmo-aes-192", S390_FEAT_TYPE_PCKMO, 19, "PCKMO Encrypted-AES-192-Key"),
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("pckmo-aes-256", S390_FEAT_TYPE_PCKMO, 20, "PCKMO Encrypted-AES-256-Key"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("pckmo-ecc-p256", S390_FEAT_TYPE_PCKMO, 32, "PCKMO Encrypt-ECC-P256-Key"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("pckmo-ecc-p384", S390_FEAT_TYPE_PCKMO, 33, "PCKMO Encrypt-ECC-P384-Key"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("pckmo-ecc-p521", S390_FEAT_TYPE_PCKMO, 34, "PCKMO Encrypt-ECC-P521-Key"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("pckmo-ecc-ed25519", S390_FEAT_TYPE_PCKMO, 40 , "PCKMO Encrypt-ECC-Ed25519-Key"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("pckmo-ecc-ed448", S390_FEAT_TYPE_PCKMO, 41 , "PCKMO Encrypt-ECC-Ed448-Key"),
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("kmctr-dea", S390_FEAT_TYPE_KMCTR, 1, "KMCTR DEA"),
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("kmctr-tdea-128", S390_FEAT_TYPE_KMCTR, 2, "KMCTR TDEA-128"),
|
|
Pablo Greco |
e6a3ae |
@@ -298,6 +304,13 @@ static const S390FeatDef s390_features[] = {
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("pcc-xts-aes-256", S390_FEAT_TYPE_PCC, 52, "PCC Compute-XTS-Parameter-Using-AES-256"),
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("pcc-xts-eaes-128", S390_FEAT_TYPE_PCC, 58, "PCC Compute-XTS-Parameter-Using-Encrypted-AES-128"),
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("pcc-xts-eaes-256", S390_FEAT_TYPE_PCC, 60, "PCC Compute-XTS-Parameter-Using-Encrypted-AES-256"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("pcc-scalar-mult-p256", S390_FEAT_TYPE_PCC, 64, "PCC Scalar-Multiply-P256"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("pcc-scalar-mult-p384", S390_FEAT_TYPE_PCC, 65, "PCC Scalar-Multiply-P384"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("pcc-scalar-mult-p521", S390_FEAT_TYPE_PCC, 66, "PCC Scalar-Multiply-P521"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("pcc-scalar-mult-ed25519", S390_FEAT_TYPE_PCC, 72, "PCC Scalar-Multiply-Ed25519"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("pcc-scalar-mult-ed448", S390_FEAT_TYPE_PCC, 73, "PCC Scalar-Multiply-Ed448"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("pcc-scalar-mult-x25519", S390_FEAT_TYPE_PCC, 80, "PCC Scalar-Multiply-X25519"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("pcc-scalar-mult-x448", S390_FEAT_TYPE_PCC, 81, "PCC Scalar-Multiply-X448"),
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("ppno-sha-512-drng", S390_FEAT_TYPE_PPNO, 3, "PPNO SHA-512-DRNG"),
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("prno-trng-qrtcr", S390_FEAT_TYPE_PPNO, 112, "PRNO TRNG-Query-Raw-to-Conditioned-Ratio"),
|
|
Pablo Greco |
e6a3ae |
@@ -309,6 +322,22 @@ static const S390FeatDef s390_features[] = {
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("kma-gcm-eaes-128", S390_FEAT_TYPE_KMA, 26, "KMA GCM-Encrypted-AES-128"),
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("kma-gcm-eaes-192", S390_FEAT_TYPE_KMA, 27, "KMA GCM-Encrypted-AES-192"),
|
|
Pablo Greco |
e6a3ae |
FEAT_INIT("kma-gcm-eaes-256", S390_FEAT_TYPE_KMA, 28, "KMA GCM-Encrypted-AES-256"),
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-ecdsa-verify-p256", S390_FEAT_TYPE_KDSA, 1, "KDSA ECDSA-Verify-P256"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-ecdsa-verify-p384", S390_FEAT_TYPE_KDSA, 2, "KDSA ECDSA-Verify-P384"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-ecdsa-verify-p521", S390_FEAT_TYPE_KDSA, 3, "KDSA ECDSA-Verify-P521"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-ecdsa-sign-p256", S390_FEAT_TYPE_KDSA, 9, "KDSA ECDSA-Sign-P256"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-ecdsa-sign-p384", S390_FEAT_TYPE_KDSA, 10, "KDSA ECDSA-Sign-P384"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-ecdsa-sign-p521", S390_FEAT_TYPE_KDSA, 11, "KDSA ECDSA-Sign-P521"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-eecdsa-sign-p256", S390_FEAT_TYPE_KDSA, 17, "KDSA Encrypted-ECDSA-Sign-P256"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-eecdsa-sign-p384", S390_FEAT_TYPE_KDSA, 18, "KDSA Encrypted-ECDSA-Sign-P384"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-eecdsa-sign-p521", S390_FEAT_TYPE_KDSA, 19, "KDSA Encrypted-ECDSA-Sign-P521"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-eddsa-verify-ed25519", S390_FEAT_TYPE_KDSA, 32, "KDSA EdDSA-Verify-Ed25519"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-eddsa-verify-ed448", S390_FEAT_TYPE_KDSA, 36, "KDSA EdDSA-Verify-Ed448"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-eddsa-sign-ed25519", S390_FEAT_TYPE_KDSA, 40, "KDSA EdDSA-Sign-Ed25519"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-eddsa-sign-ed448", S390_FEAT_TYPE_KDSA, 44, "KDSA EdDSA-Sign-Ed448"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-eeddsa-sign-ed25519", S390_FEAT_TYPE_KDSA, 48, "KDSA Encrypted-EdDSA-Sign-Ed25519"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_INIT("kdsa-eeddsa-sign-ed448", S390_FEAT_TYPE_KDSA, 52, "KDSA Encrypted-EdDSA-Sign-Ed448"),
|
|
Pablo Greco |
e6a3ae |
};
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
const S390FeatDef *s390_feat_def(S390Feat feat)
|
|
Pablo Greco |
e6a3ae |
@@ -371,6 +400,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type,
|
|
Pablo Greco |
e6a3ae |
case S390_FEAT_TYPE_PCC:
|
|
Pablo Greco |
e6a3ae |
case S390_FEAT_TYPE_PPNO:
|
|
Pablo Greco |
e6a3ae |
case S390_FEAT_TYPE_KMA:
|
|
Pablo Greco |
e6a3ae |
+ case S390_FEAT_TYPE_KDSA:
|
|
Pablo Greco |
e6a3ae |
set_be_bit(0, data); /* query is always available */
|
|
Pablo Greco |
e6a3ae |
break;
|
|
Pablo Greco |
e6a3ae |
default:
|
|
Pablo Greco |
e6a3ae |
@@ -466,6 +496,8 @@ static S390FeatGroupDef s390_feature_groups[] = {
|
|
Pablo Greco |
e6a3ae |
FEAT_GROUP_INIT("msa6", MSA_EXT_6, "Message-security-assist-extension 6 facility"),
|
|
Pablo Greco |
e6a3ae |
FEAT_GROUP_INIT("msa7", MSA_EXT_7, "Message-security-assist-extension 7 facility"),
|
|
Pablo Greco |
e6a3ae |
FEAT_GROUP_INIT("msa8", MSA_EXT_8, "Message-security-assist-extension 8 facility"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_GROUP_INIT("msa9", MSA_EXT_9, "Message-security-assist-extension 9 facility"),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_GROUP_INIT("msa9_pckmo", MSA_EXT_9_PCKMO, "Message-security-assist-extension 9 PCKMO subfunctions"),
|
|
Pablo Greco |
e6a3ae |
FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"),
|
|
Pablo Greco |
e6a3ae |
};
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
diff --git a/target/s390x/cpu_features.h b/target/s390x/cpu_features.h
|
|
Pablo Greco |
e6a3ae |
index effe790..5ffd3db 100644
|
|
Pablo Greco |
e6a3ae |
--- a/target/s390x/cpu_features.h
|
|
Pablo Greco |
e6a3ae |
+++ b/target/s390x/cpu_features.h
|
|
Pablo Greco |
e6a3ae |
@@ -39,6 +39,7 @@ typedef enum {
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_TYPE_PCC,
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_TYPE_PPNO,
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_TYPE_KMA,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_TYPE_KDSA,
|
|
Pablo Greco |
e6a3ae |
} S390FeatType;
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
/* Definition of a CPU feature */
|
|
Pablo Greco |
e6a3ae |
diff --git a/target/s390x/cpu_features_def.h b/target/s390x/cpu_features_def.h
|
|
Pablo Greco |
e6a3ae |
index 31dd678..0307848 100644
|
|
Pablo Greco |
e6a3ae |
--- a/target/s390x/cpu_features_def.h
|
|
Pablo Greco |
e6a3ae |
+++ b/target/s390x/cpu_features_def.h
|
|
Pablo Greco |
e6a3ae |
@@ -96,6 +96,7 @@ typedef enum {
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_INSERT_REFERENCE_BITS_MULT,
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_MSA_EXT_8,
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_CMM_NT,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_MSA_EXT_9,
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_ETOKEN,
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
/* Sclp Conf Char */
|
|
Pablo Greco |
e6a3ae |
@@ -240,6 +241,11 @@ typedef enum {
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_PCKMO_AES_128,
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_PCKMO_AES_192,
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_PCKMO_AES_256,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCKMO_ECC_P256,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCKMO_ECC_P384,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCKMO_ECC_P521,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCKMO_ECC_ED25519,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCKMO_ECC_ED448,
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
/* KMCTR */
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_KMCTR_DEA,
|
|
Pablo Greco |
e6a3ae |
@@ -300,6 +306,13 @@ typedef enum {
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_PCC_XTS_AES_256,
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_PCC_XTS_EAES_128,
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_PCC_XTS_EAES_256,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_P256,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_P384,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_P512,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_ED25519,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_ED448,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_X25519,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_X448,
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
/* PPNO/PRNO */
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_PPNO_SHA_512_DRNG,
|
|
Pablo Greco |
e6a3ae |
@@ -313,6 +326,24 @@ typedef enum {
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_KMA_GCM_EAES_128,
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_KMA_GCM_EAES_192,
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_KMA_GCM_EAES_256,
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+ /* KDSA */
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_ECDSA_VERIFY_P256,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_ECDSA_VERIFY_P384,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_ECDSA_VERIFY_P512,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_ECDSA_SIGN_P256,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_ECDSA_SIGN_P384,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_ECDSA_SIGN_P512,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EECDSA_SIGN_P256,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EECDSA_SIGN_P384,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EECDSA_SIGN_P512,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EDDSA_VERIFY_ED25519,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EDDSA_VERIFY_ED448,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EDDSA_SIGN_ED25519,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EDDSA_SIGN_ED448,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EEDDSA_SIGN_ED25519,
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EEDDSA_SIGN_ED448,
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_MAX,
|
|
Pablo Greco |
e6a3ae |
} S390Feat;
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
|
|
Pablo Greco |
e6a3ae |
index b4d9047..737520b 100644
|
|
Pablo Greco |
e6a3ae |
--- a/target/s390x/cpu_models.c
|
|
Pablo Greco |
e6a3ae |
+++ b/target/s390x/cpu_models.c
|
|
Pablo Greco |
e6a3ae |
@@ -758,6 +758,8 @@ static void check_consistency(const S390CPUModel *model)
|
|
Pablo Greco |
e6a3ae |
{ S390_FEAT_SIE_CMMA, S390_FEAT_SIE_GSLS },
|
|
Pablo Greco |
e6a3ae |
{ S390_FEAT_SIE_PFMFI, S390_FEAT_EDAT },
|
|
Pablo Greco |
e6a3ae |
{ S390_FEAT_MSA_EXT_8, S390_FEAT_MSA_EXT_3 },
|
|
Pablo Greco |
e6a3ae |
+ { S390_FEAT_MSA_EXT_9, S390_FEAT_MSA_EXT_3 },
|
|
Pablo Greco |
e6a3ae |
+ { S390_FEAT_MSA_EXT_9, S390_FEAT_MSA_EXT_4 },
|
|
Pablo Greco |
e6a3ae |
{ S390_FEAT_MULTIPLE_EPOCH, S390_FEAT_TOD_CLOCK_STEERING },
|
|
Pablo Greco |
e6a3ae |
{ S390_FEAT_VECTOR_PACKED_DECIMAL, S390_FEAT_VECTOR },
|
|
Pablo Greco |
e6a3ae |
{ S390_FEAT_VECTOR_ENH, S390_FEAT_VECTOR },
|
|
Pablo Greco |
e6a3ae |
diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
|
|
Pablo Greco |
e6a3ae |
index dcc5d25..39cc375 100644
|
|
Pablo Greco |
e6a3ae |
--- a/target/s390x/gen-features.c
|
|
Pablo Greco |
e6a3ae |
+++ b/target/s390x/gen-features.c
|
|
Pablo Greco |
e6a3ae |
@@ -213,6 +213,38 @@
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_KMA_GCM_EAES_192, \
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_KMA_GCM_EAES_256
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
+#define S390_FEAT_GROUP_MSA_EXT_9 \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_MSA_EXT_9, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_ECDSA_VERIFY_P256, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_ECDSA_VERIFY_P384, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_ECDSA_VERIFY_P512, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_ECDSA_SIGN_P256, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_ECDSA_SIGN_P384, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_ECDSA_SIGN_P512, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EECDSA_SIGN_P256, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EECDSA_SIGN_P384, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EECDSA_SIGN_P512, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EDDSA_VERIFY_ED25519, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EDDSA_VERIFY_ED448, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EDDSA_SIGN_ED25519, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EDDSA_SIGN_ED448, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EEDDSA_SIGN_ED25519, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_EEDDSA_SIGN_ED448, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_P256, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_P384, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_P512, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_ED25519, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_ED448, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_X25519, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCC_SCALAR_MULT_X448
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+#define S390_FEAT_GROUP_MSA_EXT_9_PCKMO \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCKMO_ECC_P256, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCKMO_ECC_P384, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCKMO_ECC_P521, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCKMO_ECC_ED25519, \
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_PCKMO_ECC_ED448
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
/* cpu feature groups */
|
|
Pablo Greco |
e6a3ae |
static uint16_t group_PLO[] = {
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_GROUP_PLO,
|
|
Pablo Greco |
e6a3ae |
@@ -254,6 +286,14 @@ static uint16_t group_MSA_EXT_8[] = {
|
|
Pablo Greco |
e6a3ae |
S390_FEAT_GROUP_MSA_EXT_8,
|
|
Pablo Greco |
e6a3ae |
};
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
+static uint16_t group_MSA_EXT_9[] = {
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_GROUP_MSA_EXT_9,
|
|
Pablo Greco |
e6a3ae |
+};
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
+static uint16_t group_MSA_EXT_9_PCKMO[] = {
|
|
Pablo Greco |
e6a3ae |
+ S390_FEAT_GROUP_MSA_EXT_9_PCKMO,
|
|
Pablo Greco |
e6a3ae |
+};
|
|
Pablo Greco |
e6a3ae |
+
|
|
Pablo Greco |
e6a3ae |
/* Base features (in order of release)
|
|
Pablo Greco |
e6a3ae |
* Only non-hypervisor managed features belong here.
|
|
Pablo Greco |
e6a3ae |
* Base feature sets are static meaning they do not change in future QEMU
|
|
Pablo Greco |
e6a3ae |
@@ -708,6 +748,8 @@ static FeatGroupDefSpec FeatGroupDef[] = {
|
|
Pablo Greco |
e6a3ae |
FEAT_GROUP_INITIALIZER(MSA_EXT_6),
|
|
Pablo Greco |
e6a3ae |
FEAT_GROUP_INITIALIZER(MSA_EXT_7),
|
|
Pablo Greco |
e6a3ae |
FEAT_GROUP_INITIALIZER(MSA_EXT_8),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_GROUP_INITIALIZER(MSA_EXT_9),
|
|
Pablo Greco |
e6a3ae |
+ FEAT_GROUP_INITIALIZER(MSA_EXT_9_PCKMO),
|
|
Pablo Greco |
e6a3ae |
FEAT_GROUP_INITIALIZER(MULTIPLE_EPOCH_PTFF),
|
|
Pablo Greco |
e6a3ae |
};
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
|
|
Pablo Greco |
e6a3ae |
index 114502d..898fe5e 100644
|
|
Pablo Greco |
e6a3ae |
--- a/target/s390x/kvm.c
|
|
Pablo Greco |
e6a3ae |
+++ b/target/s390x/kvm.c
|
|
Pablo Greco |
e6a3ae |
@@ -2079,6 +2079,9 @@ static int query_cpu_subfunc(S390FeatBitmap features)
|
|
Pablo Greco |
e6a3ae |
if (test_bit(S390_FEAT_MSA_EXT_8, features)) {
|
|
Pablo Greco |
e6a3ae |
s390_add_from_feat_block(features, S390_FEAT_TYPE_KMA, prop.kma);
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
+ if (test_bit(S390_FEAT_MSA_EXT_9, features)) {
|
|
Pablo Greco |
e6a3ae |
+ s390_add_from_feat_block(features, S390_FEAT_TYPE_KDSA, prop.kdsa);
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
return 0;
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
@@ -2123,6 +2126,9 @@ static int configure_cpu_subfunc(const S390FeatBitmap features)
|
|
Pablo Greco |
e6a3ae |
if (test_bit(S390_FEAT_MSA_EXT_8, features)) {
|
|
Pablo Greco |
e6a3ae |
s390_fill_feat_block(features, S390_FEAT_TYPE_KMA, prop.kma);
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
+ if (test_bit(S390_FEAT_MSA_EXT_9, features)) {
|
|
Pablo Greco |
e6a3ae |
+ s390_fill_feat_block(features, S390_FEAT_TYPE_KDSA, prop.kdsa);
|
|
Pablo Greco |
e6a3ae |
+ }
|
|
Pablo Greco |
e6a3ae |
return kvm_vm_ioctl(kvm_state, KVM_SET_DEVICE_ATTR, &attr);
|
|
Pablo Greco |
e6a3ae |
}
|
|
Pablo Greco |
e6a3ae |
|
|
Pablo Greco |
e6a3ae |
--
|
|
Pablo Greco |
e6a3ae |
1.8.3.1
|
|
Pablo Greco |
e6a3ae |
|