Blame SOURCES/kvm-s390x-protvirt-Handle-SIGP-store-status-correctly.patch

902636
From 680154545d1f9d75fb33615b1900661e7d09be4e Mon Sep 17 00:00:00 2001
902636
From: Thomas Huth <thuth@redhat.com>
902636
Date: Fri, 29 May 2020 05:54:15 -0400
902636
Subject: [PATCH 33/42] s390x: protvirt: Handle SIGP store status correctly
902636
902636
RH-Author: Thomas Huth <thuth@redhat.com>
902636
Message-id: <20200529055420.16855-34-thuth@redhat.com>
902636
Patchwork-id: 97054
902636
O-Subject: [RHEL-8.3.0 qemu-kvm PATCH v2 33/38] s390x: protvirt: Handle SIGP store status correctly
902636
Bugzilla: 1828317
902636
RH-Acked-by: Claudio Imbrenda <cimbrend@redhat.com>
902636
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
902636
RH-Acked-by: David Hildenbrand <david@redhat.com>
902636
902636
From: Janosch Frank <frankja@linux.ibm.com>
902636
902636
For protected VMs status storing is not done by QEMU anymore.
902636
902636
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
902636
Reviewed-by: Thomas Huth <thuth@redhat.com>
902636
Reviewed-by: David Hildenbrand <david@redhat.com>
902636
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
902636
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
902636
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
902636
Message-Id: <20200319131921.2367-15-frankja@linux.ibm.com>
902636
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
902636
(cherry picked from commit f2a2d9a2bae8f6fdc5e9a40c1241e9428f15b4df)
902636
[thuth: fixed contextual conflict due to missing commit 44eaccd091a7365fd37)
902636
Signed-off-by: Thomas Huth <thuth@redhat.com>
902636
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
902636
---
902636
 target/s390x/helper.c | 6 ++++++
902636
 1 file changed, 6 insertions(+)
902636
902636
diff --git a/target/s390x/helper.c b/target/s390x/helper.c
902636
index 6808dfda01..36b6d3d9d1 100644
902636
--- a/target/s390x/helper.c
902636
+++ b/target/s390x/helper.c
902636
@@ -25,6 +25,7 @@
902636
 #include "qemu/timer.h"
902636
 #include "qemu/qemu-print.h"
902636
 #include "hw/s390x/ioinst.h"
902636
+#include "hw/s390x/pv.h"
902636
 #include "sysemu/hw_accel.h"
902636
 #include "sysemu/runstate.h"
902636
 #ifndef CONFIG_USER_ONLY
902636
@@ -246,6 +247,11 @@ int s390_store_status(S390CPU *cpu, hwaddr addr, bool store_arch)
902636
     hwaddr len = sizeof(*sa);
902636
     int i;
902636
 
902636
+    /* For PVMs storing will occur when this cpu enters SIE again */
902636
+    if (s390_is_pv()) {
902636
+        return 0;
902636
+    }
902636
+
902636
     sa = cpu_physical_memory_map(addr, &len, 1);
902636
     if (!sa) {
902636
         return -EFAULT;
902636
-- 
902636
2.27.0
902636