yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

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

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