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