diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2020-05-08 08:43:44 -0700 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-05-11 11:14:02 +0100 |
commit | 7a1bfee682d8474340ec0fced19b9f0faef9f568 (patch) | |
tree | 09b3dab65a92f7b9836b98cf498b96f85b9a426e /accel | |
parent | 857129b34190a4c2e782006dc255352a6cd3934b (diff) | |
download | qemu-7a1bfee682d8474340ec0fced19b9f0faef9f568.zip qemu-7a1bfee682d8474340ec0fced19b9f0faef9f568.tar.gz qemu-7a1bfee682d8474340ec0fced19b9f0faef9f568.tar.bz2 |
accel/tcg: Adjust probe_access call to page_check_range
We have validated that addr+size does not cross a page boundary.
Therefore we need to validate exactly one page. We can achieve
that passing any value 1 <= x <= size to page_check_range.
Passing 1 will simplify the next patch.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20200508154359.7494-5-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'accel')
-rw-r--r-- | accel/tcg/user-exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 4be78eb..03538e2 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -211,7 +211,7 @@ void *probe_access(CPUArchState *env, target_ulong addr, int size, g_assert_not_reached(); } - if (!guest_addr_valid(addr) || page_check_range(addr, size, flags) < 0) { + if (!guest_addr_valid(addr) || page_check_range(addr, 1, flags) < 0) { CPUState *cpu = env_cpu(env); CPUClass *cc = CPU_GET_CLASS(cpu); cc->tlb_fill(cpu, addr, size, access_type, MMU_USER_IDX, false, |