qemu-e2k/accel/tcg
Ilya Leoshkevich b0f650f047 accel/tcg: Fix unaligned stores to s390x low-address-protected lowcore
If low-address-protection is active, unaligned stores to non-protected
parts of lowcore lead to protection exceptions. The reason is that in
such cases tlb_fill() call in store_helper_unaligned() covers
[0, addr + size) range, which contains the protected portion of
lowcore. This range is too large.

The most straightforward fix would be to make sure we stay within the
original [addr, addr + size) range. However, if an unaligned access
affects a single page, we don't need to call tlb_fill() in
store_helper_unaligned() at all, since it would be identical to
the previous tlb_fill() call in store_helper(), and therefore a no-op.
If an unaligned access covers multiple pages, this situation does not
occur.

Therefore simply skip TLB handling in store_helper_unaligned() if we
are dealing with a single page.

Fixes: 2bcf018340 ("s390x/tcg: low-address protection support")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20220711185640.3558813-2-iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-07-12 10:43:33 +05:30
..
atomic_common.c.inc tracing: remove TCG memory access tracing 2022-02-09 12:08:42 +00:00
atomic_template.h Replace config-time define HOST_WORDS_BIGENDIAN 2022-04-06 10:50:37 +02:00
cpu-exec-common.c Do not include cpu.h if it's not really necessary 2021-05-02 17:24:51 +02:00
cpu-exec.c accel/tcg: Inline dump_opcount_info() and remove it 2022-06-11 11:44:50 +02:00
cputlb.c accel/tcg: Fix unaligned stores to s390x low-address-protected lowcore 2022-07-12 10:43:33 +05:30
hmp.c Don't include sysemu/tcg.h if it is not necessary 2022-04-20 12:12:47 -07:00
internal.h compiler.h: replace QEMU_NORETURN with G_NORETURN 2022-04-21 17:03:51 +04:00
ldst_common.c.inc exec/memop: Adding signedness to quad definitions 2022-01-08 15:46:10 +10:00
meson.build meson: remove useless libdl test 2021-11-16 16:19:53 +00:00
plugin-gen.c plugins: move reset of plugin data to tb_start 2022-02-09 13:26:29 +00:00
plugin-helpers.h accel/tcg: Add tcg call flags to plugins helpers 2021-06-19 08:51:11 -07:00
tb-context.h tcg: Move tb_phys_invalidate_count to tb_ctx 2021-07-09 09:38:33 -07:00
tb-hash.h accel/tcg: Keep TranslationBlock headers local to TCG 2021-05-26 15:33:59 -07:00
tcg-accel-ops-icount.c replay: rewrite async event handling 2022-06-06 09:26:53 +02:00
tcg-accel-ops-icount.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-accel-ops-mttcg.c accel/tcg: Init TCG cflags in vCPU thread handler 2022-06-20 13:11:36 -07:00
tcg-accel-ops-mttcg.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-accel-ops-rr.c accel/tcg: Init TCG cflags in vCPU thread handler 2022-06-20 13:11:36 -07:00
tcg-accel-ops-rr.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-accel-ops.c accel/tcg: Reorganize tcg_accel_ops_init() 2022-06-20 13:11:36 -07:00
tcg-accel-ops.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-all.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
tcg-runtime-gvec.c accel/tcg: Use add/sub overflow routines in tcg-runtime-gvec.c 2021-05-16 07:13:51 -05:00
tcg-runtime.c accel/tcg: Move helper_lookup_tb_ptr to cpu-exec.c 2021-07-09 20:23:06 -07:00
tcg-runtime.h accel/tcg: Standardize atomic helpers on softmmu api 2021-07-21 07:45:38 -10:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h
translate-all.c accel/tcg: Inline dump_opcount_info() and remove it 2022-06-11 11:44:50 +02:00
translator.c exec/translator: Pass the locked filepointer to disas_log hook 2022-04-20 10:51:11 -07:00
user-exec-stub.c Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
user-exec.c Fix 'writeable' typos 2022-06-08 19:38:47 +01:00