aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLIU Zhiwei <zhiwei_liu@linux.alibaba.com>2023-07-29 11:16:18 +0800
committerMichael Tokarev <mjt@tls.msk.ru>2023-09-21 19:35:19 +0300
commit6c24b6000b5cdf259f1fcdfa19cee397770f0946 (patch)
tree6d29f16f7e43e9ceb7aeaef7bb5aa2bf0d39c9fb
parent987e90cfd23e44eb601e9557f61f1f6fdcef5e4c (diff)
target/riscv: Fix page_check_range use in fault-only-first
Commit bef6f008b98(accel/tcg: Return bool from page_check_range) converts integer return value to bool type. However, it wrongly converted the use of the API in riscv fault-only-first, where page_check_range < = 0, should be converted to !page_check_range. Signed-off-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20230729031618.821-1-zhiwei_liu@linux.alibaba.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> (cherry picked from commit 4cc9f284d5971ecd8055d26ef74c23ef0be8b8f5) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r--target/riscv/vector_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c
index 4d06754826..a059ef3900 100644
--- a/target/riscv/vector_helper.c
+++ b/target/riscv/vector_helper.c
@@ -583,7 +583,7 @@ vext_ldff(void *vd, void *v0, target_ulong base,
cpu_mmu_index(env, false));
if (host) {
#ifdef CONFIG_USER_ONLY
- if (page_check_range(addr, offset, PAGE_READ)) {
+ if (!page_check_range(addr, offset, PAGE_READ)) {
vl = i;
goto ProbeSuccess;
}