diff options
author | Alistair Francis | 2020-08-12 21:13:38 +0200 |
---|---|---|
committer | Alistair Francis | 2020-08-25 18:11:36 +0200 |
commit | f8dc878efc45691be7e6c2019a19c271fb9aebbb (patch) | |
tree | 63038a0777c6b2fc01e9f70d597365f653a17f8c /target/riscv | |
parent | target/riscv: Update the CSRs to the v0.6 Hyp extension (diff) | |
download | qemu-f8dc878efc45691be7e6c2019a19c271fb9aebbb.tar.gz qemu-f8dc878efc45691be7e6c2019a19c271fb9aebbb.tar.xz qemu-f8dc878efc45691be7e6c2019a19c271fb9aebbb.zip |
target/riscv: Only support a single VSXL length
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: f3f4fd2ec22a07cc1d750e96895d6813f131de4d.1597259519.git.alistair.francis@wdc.com
Message-Id: <f3f4fd2ec22a07cc1d750e96895d6813f131de4d.1597259519.git.alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv')
-rw-r--r-- | target/riscv/csr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/target/riscv/csr.c b/target/riscv/csr.c index f9ac21d687..390ef781e4 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -836,12 +836,21 @@ static int write_satp(CPURISCVState *env, int csrno, target_ulong val) static int read_hstatus(CPURISCVState *env, int csrno, target_ulong *val) { *val = env->hstatus; +#ifdef TARGET_RISCV64 + /* We only support 64-bit VSXL */ + *val = set_field(*val, HSTATUS_VSXL, 2); +#endif return 0; } static int write_hstatus(CPURISCVState *env, int csrno, target_ulong val) { env->hstatus = val; +#ifdef TARGET_RISCV64 + if (get_field(val, HSTATUS_VSXL) != 2) { + qemu_log_mask(LOG_UNIMP, "QEMU does not support mixed HSXLEN options."); + } +#endif return 0; } |