[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 07/15] s390x: protvirt: Move STSI data over SIDAD
From: |
Janosch Frank |
Subject: |
[PATCH v7 07/15] s390x: protvirt: Move STSI data over SIDAD |
Date: |
Mon, 9 Mar 2020 07:21:58 -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>
---
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 cdcd538b4f..295ed12a38 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -1797,10 +1797,13 @@ static int handle_tsch(S390CPU *cpu)
static void insert_stsi_3_2_2(S390CPU *cpu, __u64 addr, uint8_t ar)
{
+ CPUS390XState *env = &cpu->env;
SysIB_322 sysib;
int del;
- if (s390_cpu_virt_mem_read(cpu, addr, ar, &sysib, sizeof(sysib))) {
+ if (env->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 */
@@ -1840,7 +1843,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 (env->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.20.1
- Re: [PATCH v8 2/2] s390x: protvirt: Support unpack facility, (continued)
- Re: [PATCH v8 2/2] s390x: protvirt: Support unpack facility, Christian Borntraeger, 2020/03/10
- Re: [PATCH v8 1/2] s390x: ipl: Consolidate iplb validity check into one function, David Hildenbrand, 2020/03/10
- Re: [PATCH v8 1/2] s390x: ipl: Consolidate iplb validity check into one function, Christian Borntraeger, 2020/03/10
- [PATCH v8] s390x: ipl: Consolidate iplb validity check into one function, Janosch Frank, 2020/03/10
- Re: [PATCH v8] s390x: ipl: Consolidate iplb validity check into one function, Christian Borntraeger, 2020/03/10
- Re: [PATCH v8] s390x: ipl: Consolidate iplb validity check into one function, David Hildenbrand, 2020/03/10
- Re: [PATCH v8] s390x: ipl: Consolidate iplb validity check into one function, Christian Borntraeger, 2020/03/10
Re: [PATCH v7 02/15] s390x: protvirt: Support unpack facility, Viktor Mihajlovski, 2020/03/09
[PATCH v7 12/15] s390x: protvirt: Move IO control structures over SIDA, Janosch Frank, 2020/03/09
[PATCH v7 07/15] s390x: protvirt: Move STSI data over SIDAD,
Janosch Frank <=
[PATCH v7 11/15] s390x: protvirt: Disable address checks for PV guest IO emulation, Janosch Frank, 2020/03/09
[PATCH v7 14/15] docs: Add protvirt docs, Janosch Frank, 2020/03/09
[PATCH v7 05/15] s390x: protvirt: KVM intercept changes, Janosch Frank, 2020/03/09
[PATCH v7 15/15] s390x: Add unpack facility feature to GA1, Janosch Frank, 2020/03/09
[PATCH v7 13/15] s390x: protvirt: Handle SIGP store status correctly, Janosch Frank, 2020/03/09