mirror of https://github.com/xemu-project/xemu.git
target/riscv: Fix satp write
These variables should be target_ulong. If truncated to int, the bool conditions they indicate will be wrong. As satp is very important for Linux, this bug almost fails every boot. Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20210901124539.222868-1-zhiwei_liu@c-sky.com Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
a44da25aa6
commit
15732b8ed2
|
@ -986,7 +986,7 @@ static RISCVException read_satp(CPURISCVState *env, int csrno,
|
|||
static RISCVException write_satp(CPURISCVState *env, int csrno,
|
||||
target_ulong val)
|
||||
{
|
||||
int vm, mask, asid;
|
||||
target_ulong vm, mask, asid;
|
||||
|
||||
if (!riscv_feature(env, RISCV_FEATURE_MMU)) {
|
||||
return RISCV_EXCP_NONE;
|
||||
|
|
Loading…
Reference in New Issue