yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-s390x-cpumodel-mepochptff-warn-when-no-mepoch-and-re.patch

ae23c9
From 5bb9f99d9dbe71424f656f597b650d5088faca23 Mon Sep 17 00:00:00 2001
ae23c9
From: Thomas Huth <thuth@redhat.com>
ae23c9
Date: Fri, 29 Mar 2019 11:13:35 +0000
ae23c9
Subject: [PATCH 1/7] s390x/cpumodel: mepochptff: warn when no mepoch and
ae23c9
 re-align group init
ae23c9
ae23c9
RH-Author: Thomas Huth <thuth@redhat.com>
ae23c9
Message-id: <1553858017-376-2-git-send-email-thuth@redhat.com>
ae23c9
Patchwork-id: 85237
ae23c9
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH 1/3] s390x/cpumodel: mepochptff: warn when no mepoch and re-align group init
ae23c9
Bugzilla: 1664371
ae23c9
RH-Acked-by: David Hildenbrand <david@redhat.com>
ae23c9
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
ae23c9
RH-Acked-by: Jens Freimann <jfreimann@redhat.com>
ae23c9
ae23c9
From: Collin Walling <walling@linux.ibm.com>
ae23c9
ae23c9
The extended PTFF features (qsie, qtoue, stoe, stoue) are dependent
ae23c9
on the multiple-epoch facility (mepoch). Let's print a warning if these
ae23c9
features are enabled without mepoch.
ae23c9
ae23c9
While we're at it, let's move the FEAT_GROUP_INIT for mepochptff down
ae23c9
the s390_feature_groups list so it can be properly indexed with its
ae23c9
generated S390FeatGroup enum.
ae23c9
ae23c9
Signed-off-by: Collin Walling <walling@linux.ibm.com>
ae23c9
Message-Id: <20190212011657.18324-1-walling@linux.ibm.com>
ae23c9
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
ae23c9
Reviewed-by: David Hildenbrand <david@redhat.com>
ae23c9
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
ae23c9
(cherry picked from commit ddf5d18af3ce3029d5b93222af5a9e8160d4c34b)
ae23c9
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ae23c9
---
ae23c9
 target/s390x/cpu_features.c | 2 +-
ae23c9
 target/s390x/cpu_models.c   | 4 ++++
ae23c9
 2 files changed, 5 insertions(+), 1 deletion(-)
ae23c9
ae23c9
diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
ae23c9
index 0fbee27..91e40c2 100644
ae23c9
--- a/target/s390x/cpu_features.c
ae23c9
+++ b/target/s390x/cpu_features.c
ae23c9
@@ -457,7 +457,6 @@ static S390FeatGroupDef s390_feature_groups[] = {
ae23c9
     FEAT_GROUP_INIT("plo", PLO, "Perform-locked-operation facility"),
ae23c9
     FEAT_GROUP_INIT("tods", TOD_CLOCK_STEERING, "Tod-clock-steering facility"),
ae23c9
     FEAT_GROUP_INIT("gen13ptff", GEN13_PTFF, "PTFF enhancements introduced with z13"),
ae23c9
-    FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"),
ae23c9
     FEAT_GROUP_INIT("msa", MSA, "Message-security-assist facility"),
ae23c9
     FEAT_GROUP_INIT("msa1", MSA_EXT_1, "Message-security-assist-extension 1 facility"),
ae23c9
     FEAT_GROUP_INIT("msa2", MSA_EXT_2, "Message-security-assist-extension 2 facility"),
ae23c9
@@ -467,6 +466,7 @@ static S390FeatGroupDef s390_feature_groups[] = {
ae23c9
     FEAT_GROUP_INIT("msa6", MSA_EXT_6, "Message-security-assist-extension 6 facility"),
ae23c9
     FEAT_GROUP_INIT("msa7", MSA_EXT_7, "Message-security-assist-extension 7 facility"),
ae23c9
     FEAT_GROUP_INIT("msa8", MSA_EXT_8, "Message-security-assist-extension 8 facility"),
ae23c9
+    FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"),
ae23c9
 };
ae23c9
 
ae23c9
 const S390FeatGroupDef *s390_feat_group_def(S390FeatGroup group)
ae23c9
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
ae23c9
index 3856104..43f16a7 100644
ae23c9
--- a/target/s390x/cpu_models.c
ae23c9
+++ b/target/s390x/cpu_models.c
ae23c9
@@ -776,6 +776,10 @@ static void check_consistency(const S390CPUModel *model)
ae23c9
         { S390_FEAT_SIE_KSS, S390_FEAT_SIE_F2 },
ae23c9
         { S390_FEAT_AP_QUERY_CONFIG_INFO, S390_FEAT_AP },
ae23c9
         { S390_FEAT_AP_FACILITIES_TEST, S390_FEAT_AP },
ae23c9
+        { S390_FEAT_PTFF_QSIE, S390_FEAT_MULTIPLE_EPOCH },
ae23c9
+        { S390_FEAT_PTFF_QTOUE, S390_FEAT_MULTIPLE_EPOCH },
ae23c9
+        { S390_FEAT_PTFF_STOE, S390_FEAT_MULTIPLE_EPOCH },
ae23c9
+        { S390_FEAT_PTFF_STOUE, S390_FEAT_MULTIPLE_EPOCH },
ae23c9
     };
ae23c9
     int i;
ae23c9
 
ae23c9
-- 
ae23c9
1.8.3.1
ae23c9