diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2023-08-05 01:55:33 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2023-09-11 10:53:50 +0300 |
commit | 7760cfd9c82685fe498bef63b2fe8844de1f23ef (patch) | |
tree | 6155320d5fd9e6c53b0683d0a3421766f25d4d09 /target/s390x | |
parent | 7c4ce14b4147a796b2d174a41a6e06e9c44e746e (diff) |
target/s390x: Fix VSTL with a large length
The length is always truncated to 16 bytes. Do not probe more than
that.
Cc: qemu-stable@nongnu.org
Fixes: 0e0a5b49ad58 ("s390x/tcg: Implement VECTOR STORE WITH LENGTH")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230804235624.263260-1-iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 6db3518ba4fcddd71049718f138552999f0d97b4)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'target/s390x')
-rw-r--r-- | target/s390x/tcg/vec_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/s390x/tcg/vec_helper.c b/target/s390x/tcg/vec_helper.c index 48d86722b2..dafc4c3582 100644 --- a/target/s390x/tcg/vec_helper.c +++ b/target/s390x/tcg/vec_helper.c @@ -193,7 +193,7 @@ void HELPER(vstl)(CPUS390XState *env, const void *v1, uint64_t addr, uint64_t bytes) { /* Probe write access before actually modifying memory */ - probe_write_access(env, addr, bytes, GETPC()); + probe_write_access(env, addr, MIN(bytes, 16), GETPC()); if (likely(bytes >= 16)) { cpu_stq_data_ra(env, addr, s390_vec_read_element64(v1, 0), GETPC()); |