Revision | 01d09525da655fed6cabc49a6088c4e11f93612a (tree) |
---|---|
Time | 2022-01-21 14:52:57 |
Author | LIU Zhiwei <zhiwei_liu@c-sk...> |
Commiter | Alistair Francis |
target/riscv: Fix check range for first fault only
Only check the range that has passed the address translation.
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20220120122050.41546-19-zhiwei_liu@c-sky.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
@@ -500,12 +500,12 @@ vext_ldff(void *vd, void *v0, target_ulong base, | ||
500 | 500 | cpu_mmu_index(env, false)); |
501 | 501 | if (host) { |
502 | 502 | #ifdef CONFIG_USER_ONLY |
503 | - if (page_check_range(addr, nf << esz, PAGE_READ) < 0) { | |
503 | + if (page_check_range(addr, offset, PAGE_READ) < 0) { | |
504 | 504 | vl = i; |
505 | 505 | goto ProbeSuccess; |
506 | 506 | } |
507 | 507 | #else |
508 | - probe_pages(env, addr, nf << esz, ra, MMU_DATA_LOAD); | |
508 | + probe_pages(env, addr, offset, ra, MMU_DATA_LOAD); | |
509 | 509 | #endif |
510 | 510 | } else { |
511 | 511 | vl = i; |