Skip to content

Commit

Permalink
target/riscv: Fix page_check_range use in fault-only-first
Browse files Browse the repository at this point in the history
Commit bef6f00(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 4cc9f28)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
romanheros authored and Michael Tokarev committed Sep 12, 2023
1 parent b2e4203 commit f5cef73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/riscv/vector_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f5cef73

Please sign in to comment.