mirror_qemu/accel
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
..
hvf Fix 'writeable' typos 2022-06-08 19:38:47 +01:00
kvm qmp: add filtering of statistics by name 2022-06-14 16:50:30 +02:00
qtest misc: Remove unnecessary "sysemu/cpu-timers.h" include 2022-03-06 13:15:42 +01:00
stubs accel/stubs: Add tcg stub for probe_access_flags 2022-06-28 04:35:06 +05:30
tcg accel/tcg: Fix unaligned stores to s390x low-address-protected lowcore 2022-07-12 10:43:33 +05:30
xen sysemu: Let VMChangeStateHandler take boolean 'running' argument 2021-03-09 23:13:57 +01:00
Kconfig Add NVMM accelerator: configure and build logic 2021-05-04 14:15:34 +02:00
accel-common.c accel: Introduce current_accel_name() 2022-06-27 11:18:17 +01:00
accel-softmmu.c accel: autoload modules 2021-07-09 18:21:33 +02:00
accel-softmmu.h accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
accel-user.c accel: extend AccelState and AccelClass to user-mode 2021-02-05 10:24:15 -10:00
dummy-cpus.c accel: move qtest CpusAccel functions to a common location 2020-10-24 07:23:19 +02:00
meson.build accel/meson: Only build hw virtualization with system emulation 2022-03-06 13:15:42 +01:00