[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/30] s390x/tcg: MVCLU: Fault-safe handling
From: |
David Hildenbrand |
Subject: |
[PULL 20/30] s390x/tcg: MVCLU: Fault-safe handling |
Date: |
Mon, 23 Sep 2019 10:07:02 +0200 |
The last remaining bit is padding with two bytes.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
---
target/s390x/mem_helper.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index aed53a37da..271b1db664 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -925,15 +925,17 @@ static inline uint32_t do_mvcl(CPUS390XState *env,
access_memset(env, &desta, pad, ra);
*dest = wrap_address(env, *dest + len);
} else {
+ desta = access_prepare(env, *dest, len, MMU_DATA_STORE, mmu_idx, ra);
+
/* The remaining length selects the padding byte. */
for (i = 0; i < len; (*destlen)--, i++) {
if (*destlen & 1) {
- cpu_stb_data_ra(env, *dest, pad, ra);
+ access_set_byte(env, &desta, i, pad, ra);
} else {
- cpu_stb_data_ra(env, *dest, pad >> 8, ra);
+ access_set_byte(env, &desta, i, pad >> 8, ra);
}
- *dest = wrap_address(env, *dest + 1);
}
+ *dest = wrap_address(env, *dest + len);
}
return *destlen ? 3 : cc;
--
2.21.0
- [PULL 10/30] s390x/tcg: MVCS/MVCP: Check for special operation exceptions, (continued)
- [PULL 10/30] s390x/tcg: MVCS/MVCP: Check for special operation exceptions, David Hildenbrand, 2019/09/23
- [PULL 11/30] s390x/tcg: MVCOS: Lengths are 32 bit in 24/31-bit mode, David Hildenbrand, 2019/09/23
- [PULL 12/30] s390x/tcg: MVCS/MVCP: Properly wrap the length, David Hildenbrand, 2019/09/23
- [PULL 13/30] s390x/tcg: MVST: Check for specification exceptions, David Hildenbrand, 2019/09/23
- [PULL 14/30] s390x/tcg: MVST: Fix storing back the addresses to registers, David Hildenbrand, 2019/09/23
- [PULL 15/30] s390x/tcg: Always use MMU_USER_IDX for CONFIG_USER_ONLY, David Hildenbrand, 2019/09/23
- [PULL 16/30] s390x/tcg: Fault-safe memset, David Hildenbrand, 2019/09/23
- [PULL 18/30] s390x/tcg: MVCS/MVCP: Use access_memmove(), David Hildenbrand, 2019/09/23
- [PULL 17/30] s390x/tcg: Fault-safe memmove, David Hildenbrand, 2019/09/23
- [PULL 19/30] s390x/tcg: MVC: Fault-safe handling on destructive overlaps, David Hildenbrand, 2019/09/23
- [PULL 20/30] s390x/tcg: MVCLU: Fault-safe handling,
David Hildenbrand <=
- [PULL 21/30] s390x/tcg: OC: Fault-safe handling, David Hildenbrand, 2019/09/23
- [PULL 22/30] s390x/tcg: XC: Fault-safe handling, David Hildenbrand, 2019/09/23
- [PULL 23/30] s390x/tcg: NC: Fault-safe handling, David Hildenbrand, 2019/09/23
- [PULL 24/30] s390x/tcg: MVCIN: Fault-safe handling, David Hildenbrand, 2019/09/23
- [PULL 25/30] s390x/tcg: MVN: Fault-safe handling, David Hildenbrand, 2019/09/23
- [PULL 26/30] s390x/tcg: MVZ: Fault-safe handling, David Hildenbrand, 2019/09/23
- [PULL 27/30] s390x/tcg: MVST: Fault-safe handling, David Hildenbrand, 2019/09/23
- [PULL 28/30] s390x/tcg: MVO: Fault-safe handling, David Hildenbrand, 2019/09/23
- [PULL 29/30] tests/tcg: target/s390x: Test MVO, David Hildenbrand, 2019/09/23
- [PULL 30/30] tests/tcg: target/s390x: Test MVC, David Hildenbrand, 2019/09/23