91 lines
3.8 KiB
Diff
91 lines
3.8 KiB
Diff
|
From aeb20f5f209002675477b17e87577cd793151457 Mon Sep 17 00:00:00 2001
|
||
|
From: Hendrik Brueckner <brueckner@linux.ibm.com>
|
||
|
Date: Fri, 6 Dec 2024 13:27:41 +0100
|
||
|
Subject: [PATCH 06/19] s390x/cpumodel: Add ptff Query Time-Stamp Event (QTSE)
|
||
|
support
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
RH-Author: Thomas Huth <thuth@redhat.com>
|
||
|
RH-MergeRequest: 304: CPU model for new IBM Z gen17 hardware
|
||
|
RH-Jira: RHEL-50212
|
||
|
RH-Acked-by: Cédric Le Goater <clg@redhat.com>
|
||
|
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
|
||
|
RH-Commit: [6/16] 515643e8201e25958e81e36c22de0192eb1f1a19 (thuth/qemu-kvm-cs9)
|
||
|
|
||
|
Introduce a new PTFF subfunction to query-stamp events.
|
||
|
|
||
|
Signed-off-by: Hendrik Brueckner <brueckner@linux.ibm.com>
|
||
|
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
|
||
|
Message-ID: <20241206122751.189721-6-brueckner@linux.ibm.com>
|
||
|
Signed-off-by: Thomas Huth <thuth@redhat.com>
|
||
|
(cherry picked from commit eba6f49128fbcf75d19acb6aef250d0664d03e9e)
|
||
|
---
|
||
|
target/s390x/cpu_features.c | 1 +
|
||
|
target/s390x/cpu_features_def.h.inc | 1 +
|
||
|
target/s390x/gen-features.c | 9 +++++++++
|
||
|
3 files changed, 11 insertions(+)
|
||
|
|
||
|
diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
|
||
|
index 9ba127e386..385a2ff860 100644
|
||
|
--- a/target/s390x/cpu_features.c
|
||
|
+++ b/target/s390x/cpu_features.c
|
||
|
@@ -241,6 +241,7 @@ static S390FeatGroupDef s390_feature_groups[] = {
|
||
|
FEAT_GROUP_INIT("plo", PLO, "Perform-locked-operation facility"),
|
||
|
FEAT_GROUP_INIT("tods", TOD_CLOCK_STEERING, "Tod-clock-steering facility"),
|
||
|
FEAT_GROUP_INIT("gen13ptff", GEN13_PTFF, "PTFF enhancements introduced with z13"),
|
||
|
+ FEAT_GROUP_INIT("gen17ptff", GEN17_PTFF, "PTFF enhancements introduced with gen17"),
|
||
|
FEAT_GROUP_INIT("msa", MSA, "Message-security-assist facility"),
|
||
|
FEAT_GROUP_INIT("msa1", MSA_EXT_1, "Message-security-assist-extension 1 facility"),
|
||
|
FEAT_GROUP_INIT("msa2", MSA_EXT_2, "Message-security-assist-extension 2 facility"),
|
||
|
diff --git a/target/s390x/cpu_features_def.h.inc b/target/s390x/cpu_features_def.h.inc
|
||
|
index 2132837ffe..f96cb5a7d8 100644
|
||
|
--- a/target/s390x/cpu_features_def.h.inc
|
||
|
+++ b/target/s390x/cpu_features_def.h.inc
|
||
|
@@ -181,6 +181,7 @@ DEF_FEAT(PTFF_QSI, "ptff-qsi", PTFF, 2, "PTFF Query Steering Information")
|
||
|
DEF_FEAT(PTFF_QPT, "ptff-qpc", PTFF, 3, "PTFF Query Physical Clock")
|
||
|
DEF_FEAT(PTFF_QUI, "ptff-qui", PTFF, 4, "PTFF Query UTC Information")
|
||
|
DEF_FEAT(PTFF_QTOU, "ptff-qtou", PTFF, 5, "PTFF Query TOD Offset User")
|
||
|
+DEF_FEAT(PTFF_QTSE, "ptff-qtse", PTFF, 6, "PTFF Query Time-Stamp Event")
|
||
|
DEF_FEAT(PTFF_QSIE, "ptff-qsie", PTFF, 10, "PTFF Query Steering Information Extended")
|
||
|
DEF_FEAT(PTFF_QTOUE, "ptff-qtoue", PTFF, 13, "PTFF Query TOD Offset User Extended")
|
||
|
DEF_FEAT(PTFF_STO, "ptff-sto", PTFF, 65, "PTFF Set TOD Offset")
|
||
|
diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
|
||
|
index 3326e7df43..302b653214 100644
|
||
|
--- a/target/s390x/gen-features.c
|
||
|
+++ b/target/s390x/gen-features.c
|
||
|
@@ -64,6 +64,9 @@
|
||
|
S390_FEAT_PTFF_STOE, \
|
||
|
S390_FEAT_PTFF_STOUE
|
||
|
|
||
|
+#define S390_FEAT_GROUP_GEN17_PTFF \
|
||
|
+ S390_FEAT_PTFF_QTSE
|
||
|
+
|
||
|
#define S390_FEAT_GROUP_MSA \
|
||
|
S390_FEAT_MSA, \
|
||
|
S390_FEAT_KMAC_DEA, \
|
||
|
@@ -318,6 +321,11 @@ static uint16_t group_GEN13_PTFF[] = {
|
||
|
static uint16_t group_MULTIPLE_EPOCH_PTFF[] = {
|
||
|
S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF,
|
||
|
};
|
||
|
+
|
||
|
+static uint16_t group_GEN17_PTFF[] = {
|
||
|
+ S390_FEAT_GROUP_GEN17_PTFF,
|
||
|
+};
|
||
|
+
|
||
|
static uint16_t group_MSA[] = {
|
||
|
S390_FEAT_GROUP_MSA,
|
||
|
};
|
||
|
@@ -918,6 +926,7 @@ static FeatGroupDefSpec FeatGroupDef[] = {
|
||
|
FEAT_GROUP_INITIALIZER(PLO),
|
||
|
FEAT_GROUP_INITIALIZER(TOD_CLOCK_STEERING),
|
||
|
FEAT_GROUP_INITIALIZER(GEN13_PTFF),
|
||
|
+ FEAT_GROUP_INITIALIZER(GEN17_PTFF),
|
||
|
FEAT_GROUP_INITIALIZER(MSA),
|
||
|
FEAT_GROUP_INITIALIZER(MSA_EXT_1),
|
||
|
FEAT_GROUP_INITIALIZER(MSA_EXT_2),
|
||
|
--
|
||
|
2.39.3
|
||
|
|