[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v11 08/16] s390x: protvirt: Move STSI data over SIDAD
From: |
Janosch Frank |
Subject: |
[PATCH v11 08/16] s390x: protvirt: Move STSI data over SIDAD |
Date: |
Thu, 19 Mar 2020 09:19:13 -0400 |
For protected guests, we need to put the STSI emulation results into
the SIDA, so SIE will write them into the guest at the next entry.
Signed-off-by: Janosch Frank <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Reviewed-by: Claudio Imbrenda <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
---
target/s390x/kvm.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index cfca4c58df60eb85..462a1d70ee78104c 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -50,6 +50,7 @@
#include "exec/memattrs.h"
#include "hw/s390x/s390-virtio-ccw.h"
#include "hw/s390x/s390-virtio-hcall.h"
+#include "hw/s390x/pv.h"
#ifndef DEBUG_KVM
#define DEBUG_KVM 0
@@ -1806,7 +1807,9 @@ static void insert_stsi_3_2_2(S390CPU *cpu, __u64 addr,
uint8_t ar)
SysIB_322 sysib;
int del;
- if (s390_cpu_virt_mem_read(cpu, addr, ar, &sysib, sizeof(sysib))) {
+ if (s390_is_pv()) {
+ s390_cpu_pv_mem_read(cpu, 0, &sysib, sizeof(sysib));
+ } else if (s390_cpu_virt_mem_read(cpu, addr, ar, &sysib, sizeof(sysib))) {
return;
}
/* Shift the stack of Extended Names to prepare for our own data */
@@ -1846,7 +1849,11 @@ static void insert_stsi_3_2_2(S390CPU *cpu, __u64 addr,
uint8_t ar)
/* Insert UUID */
memcpy(sysib.vm[0].uuid, &qemu_uuid, sizeof(sysib.vm[0].uuid));
- s390_cpu_virt_mem_write(cpu, addr, ar, &sysib, sizeof(sysib));
+ if (s390_is_pv()) {
+ s390_cpu_pv_mem_write(cpu, 0, &sysib, sizeof(sysib));
+ } else {
+ s390_cpu_virt_mem_write(cpu, addr, ar, &sysib, sizeof(sysib));
+ }
}
static int handle_stsi(S390CPU *cpu)
--
2.25.1
[PATCH v11 06/16] s390x: protvirt: KVM intercept changes, Janosch Frank, 2020/03/19
[PATCH v11 08/16] s390x: protvirt: Move STSI data over SIDAD,
Janosch Frank <=
[PATCH v11 10/16] s390x: protvirt: Set guest IPL PSW, Janosch Frank, 2020/03/19
[PATCH v11 07/16] s390x: Add SIDA memory ops, Janosch Frank, 2020/03/19
[PATCH v11 09/16] s390x: protvirt: SCLP interpretation, Janosch Frank, 2020/03/19
[PATCH v11 13/16] s390x: protvirt: Move IO control structures over SIDA, Janosch Frank, 2020/03/19
[PATCH v11 12/16] s390x: protvirt: Disable address checks for PV guest IO emulation, Janosch Frank, 2020/03/19
[PATCH v11 11/16] s390x: protvirt: Move diag 308 data over SIDA, Janosch Frank, 2020/03/19
[PATCH v11 14/16] s390x: protvirt: Handle SIGP store status correctly, Janosch Frank, 2020/03/19
[PATCH v11 16/16] s390x: Add unpack facility feature to GA1, Janosch Frank, 2020/03/19
[PATCH v11 15/16] docs: system: Add protvirt docs, Janosch Frank, 2020/03/19