Blob Blame History Raw
From c2c11da318c64a43bb0ed7d07f329d2f1816eb3f Mon Sep 17 00:00:00 2001
From: Thomas Huth <thuth@redhat.com>
Date: Fri, 29 Mar 2019 11:13:37 +0000
Subject: [PATCH 3/7] redhat: s390x/cpumodel: enable mepoch by default for z14
 GA2

RH-Author: Thomas Huth <thuth@redhat.com>
Message-id: <1553858017-376-4-git-send-email-thuth@redhat.com>
Patchwork-id: 85240
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH 3/3] redhat: s390x/cpumodel: enable mepoch by default for z14 GA2
Bugzilla: 1664371
RH-Acked-by: David Hildenbrand <david@redhat.com>
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
RH-Acked-by: Jens Freimann <jfreimann@redhat.com>

Upstream-status: n/a (downstream only)

Enable the mepoch feature for the new z14 GA2 CPU model. In upstream
QEMU, this feature has already been enabled by default for the GA1
CPU model in new machine types, too:

    84176c7906ffaf59457bd7dff25a3ea32e00c3d8
    "s390x/cpumodel: default enable mepoch for z14 and later"

But since we do not have new machine types in RHEL8 qemu-kvm yet,
we can not play the trick with the machine type here and thus can
only enable mepoch for the new z14 GA2 CPU. Users of the z14 GA1
CPU will have to enable this feature manually.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
 target/s390x/gen-features.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
index dee8375..739d5f1 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -556,7 +556,15 @@ static uint16_t default_GEN14_GA1[] = {
     S390_FEAT_GROUP_MSA_EXT_8,
 };
 
-#define default_GEN14_GA2 EmptyFeat
+/*
+ * Red Hat only: We enable the MULTIPLE_EPOCH features only for z14 GA2 and
+ * not for GA1 already, since we do not have a new s390-ccw-virtio-rhel8.y.0
+ * machine type for applying upstream commit 84176c7906ffaf59457bd7 correctly.
+ */
+static uint16_t default_GEN14_GA2[] = {
+    S390_FEAT_MULTIPLE_EPOCH,
+    S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF,
+};
 
 /* QEMU (CPU model) features */
 
-- 
1.8.3.1