[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v8 18/23] target/riscv: Fix check range for first fault only
From: |
LIU Zhiwei |
Subject: |
[PATCH v8 18/23] target/riscv: Fix check range for first fault only |
Date: |
Thu, 20 Jan 2022 20:20:45 +0800 |
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>
---
target/riscv/vector_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c
index 8b7c9ec890..efb3129532 100644
--- a/target/riscv/vector_helper.c
+++ b/target/riscv/vector_helper.c
@@ -500,12 +500,12 @@ 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, nf << esz, PAGE_READ) < 0) {
+ if (page_check_range(addr, offset, PAGE_READ) < 0) {
vl = i;
goto ProbeSuccess;
}
#else
- probe_pages(env, addr, nf << esz, ra, MMU_DATA_LOAD);
+ probe_pages(env, addr, offset, ra, MMU_DATA_LOAD);
#endif
} else {
vl = i;
--
2.25.1
- [PATCH v8 08/23] target/riscv: Use gdb xml according to max mxlen, (continued)
- [PATCH v8 08/23] target/riscv: Use gdb xml according to max mxlen, LIU Zhiwei, 2022/01/20
- [PATCH v8 09/23] target/riscv: Relax debug check for pm write, LIU Zhiwei, 2022/01/20
- [PATCH v8 10/23] target/riscv: Adjust csr write mask with XLEN, LIU Zhiwei, 2022/01/20
- [PATCH v8 12/23] target/riscv: Alloc tcg global for cur_pm[mask|base], LIU Zhiwei, 2022/01/20
- [PATCH v8 11/23] target/riscv: Create current pm fields in env, LIU Zhiwei, 2022/01/20
- [PATCH v8 13/23] target/riscv: Calculate address according to XLEN, LIU Zhiwei, 2022/01/20
- [PATCH v8 14/23] target/riscv: Split pm_enabled into mask and base, LIU Zhiwei, 2022/01/20
- [PATCH v8 15/23] target/riscv: Split out the vill from vtype, LIU Zhiwei, 2022/01/20
- [PATCH v8 16/23] target/riscv: Adjust vsetvl according to XLEN, LIU Zhiwei, 2022/01/20
- [PATCH v8 17/23] target/riscv: Remove VILL field in VTYPE, LIU Zhiwei, 2022/01/20
- [PATCH v8 18/23] target/riscv: Fix check range for first fault only,
LIU Zhiwei <=
- [PATCH v8 19/23] target/riscv: Adjust vector address with mask, LIU Zhiwei, 2022/01/20
- [PATCH v8 20/23] target/riscv: Adjust scalar reg in vector with XLEN, LIU Zhiwei, 2022/01/20
- [PATCH v8 22/23] target/riscv: Enable uxl field write, LIU Zhiwei, 2022/01/20
- [PATCH v8 21/23] target/riscv: Set default XLEN for hypervisor, LIU Zhiwei, 2022/01/20
- [PATCH v8 23/23] target/riscv: Relax UXL field for debugging, LIU Zhiwei, 2022/01/20
- Re: [PATCH v8 00/23] Support UXL filed in xstatus, Alistair Francis, 2022/01/20