Skip to content

Commit

Permalink
Fix block_map_clear undefined when JIT=1
Browse files Browse the repository at this point in the history
  • Loading branch information
ChinYikMing committed Nov 2, 2024
1 parent 459cf5c commit c5384ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,14 @@ static uint32_t csr_csrrw(riscv_t *rv, uint32_t csr, uint32_t val)

*c = val;

#if !RV32_HAS(JIT)
/*
* guestOS's process might have same VA,
* so block_map cannot be reused
*/
if (c == &rv->csr_satp)
block_map_clear(rv);
#endif

return out;
}
Expand Down

0 comments on commit c5384ad

Please sign in to comment.