diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2022-07-11 20:56:38 +0200 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2022-07-12 10:43:33 +0530 |
commit | b0f650f0477ae775e0915e3d60ab5110ad5e9157 (patch) | |
tree | ae709274082e661508bfa4ea9879c702ba6b5d02 /scripts/qapi/common.py | |
parent | ba8924113ca459d02ee67656a713f7ff494b968e (diff) |
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: 2bcf018340cb ("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>
Diffstat (limited to 'scripts/qapi/common.py')
0 files changed, 0 insertions, 0 deletions