From: Max Chou <[email protected]> When probe_pages probes a memory region that spans two pages, it calls probe_access_flags twice - once for each page. However, the flags from the second page probe were overwriting the flags from the first page instead of being merged together.
Signed-off-by: Max Chou <[email protected]> Reviewed-by: Alistair Francis <[email protected]> Message-ID: <[email protected]> Signed-off-by: Alistair Francis <[email protected]> --- target/riscv/vector_helper.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index caa8dd9c12..e60248d6d3 100644 --- a/target/riscv/vector_helper.c +++ b/target/riscv/vector_helper.c @@ -151,9 +151,9 @@ static void probe_pages(CPURISCVState *env, target_ulong addr, target_ulong len, addr += curlen; curlen = len - curlen; if (flags != NULL) { - *flags = probe_access_flags(env, adjust_addr(env, addr), curlen, - access_type, mmu_index, nonfault, - host, ra); + *flags |= probe_access_flags(env, adjust_addr(env, addr), curlen, + access_type, mmu_index, nonfault, + host, ra); } else { probe_access(env, adjust_addr(env, addr), curlen, access_type, mmu_index, ra); @@ -161,7 +161,6 @@ static void probe_pages(CPURISCVState *env, target_ulong addr, target_ulong len, } } - static inline void vext_set_elem_mask(void *v0, int index, uint8_t value) { -- 2.53.0
