aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-01-01 18:19:44 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-01-01 18:19:44 +0000
commit83734919c408ba02adb6ea616d68cd1a72837fbe (patch)
tree6eaaea3aa701ddb8e1f0b59c002b4f4002f9153f /hw
parent3896895ab491601abd10a8059b90bdb32d91f172 (diff)
parent24bfaae13958b823a4f33b70fca52f086851641f (diff)
Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20201222' into staging
Further s390x updates: - enhance the s390 devices acceptance test - tcg: improve carry computation - qga: send the ccw address with the fsinfo data - fixes for protected virtualisation and zpci # gpg: Signature made Tue 22 Dec 2020 10:37:34 GMT # gpg: using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF # gpg: issuer "cohuck@redhat.com" # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [unknown] # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full] # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full] # gpg: aka "Cornelia Huck <cohuck@kernel.org>" [unknown] # gpg: aka "Cornelia Huck <cohuck@redhat.com>" [unknown] # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck-gitlab/tags/s390x-20201222: tests/acceptance: Add a test with the Fedora 31 kernel and initrd s390x/pci: Fix memory_region_access_valid call s390x/pci: fix pcistb length tests/acceptance: Test the virtio-balloon device on s390x tests/acceptance: Test virtio-rng on s390 via /dev/hwrng tests/acceptance: Extract the code to clear dmesg and wait for CRW reports tests/acceptance: test hot(un)plug of ccw devices target/s390x: Improve SUB LOGICAL WITH BORROW target/s390x: Improve cc computation for SUBTRACT LOGICAL target/s390x: Improve ADD LOGICAL WITH CARRY target/s390x: Improve cc computation for ADD LOGICAL qga/commands-posix: Send CCW address on s390x with the fsinfo data MAINTAINERS: move my git tree to gitlab s390x: pv: Fence additional unavailable SCLP facilities for PV guests Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/s390x/s390-pci-inst.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c
index d9e1e29f1e..76b08a39a7 100644
--- a/hw/s390x/s390-pci-inst.c
+++ b/hw/s390x/s390-pci-inst.c
@@ -755,7 +755,7 @@ int pcistb_service_call(S390CPU *cpu, uint8_t r1, uint8_t r3, uint64_t gaddr,
int i;
uint32_t fh;
uint8_t pcias;
- uint8_t len;
+ uint16_t len;
uint8_t buffer[128];
if (env->psw.mask & PSW_MASK_PSTATE) {
@@ -765,7 +765,7 @@ int pcistb_service_call(S390CPU *cpu, uint8_t r1, uint8_t r3, uint64_t gaddr,
fh = env->regs[r1] >> 32;
pcias = (env->regs[r1] >> 16) & 0xf;
- len = env->regs[r1] & 0xff;
+ len = env->regs[r1] & 0x1fff;
offset = env->regs[r3];
if (!(fh & FH_MASK_ENABLE)) {
@@ -821,10 +821,12 @@ int pcistb_service_call(S390CPU *cpu, uint8_t r1, uint8_t r3, uint64_t gaddr,
mr = s390_get_subregion(mr, offset, len);
offset -= mr->addr;
- if (!memory_region_access_valid(mr, offset, len, true,
- MEMTXATTRS_UNSPECIFIED)) {
- s390_program_interrupt(env, PGM_OPERAND, ra);
- return 0;
+ for (i = 0; i < len; i += 8) {
+ if (!memory_region_access_valid(mr, offset + i, 8, true,
+ MEMTXATTRS_UNSPECIFIED)) {
+ s390_program_interrupt(env, PGM_OPERAND, ra);
+ return 0;
+ }
}
if (s390_cpu_virt_mem_read(cpu, gaddr, ar, buffer, len)) {