target/riscv: Only support a single VSXL length

Backports f8dc878efc45691be7e6c2019a19c271fb9aebbb
This commit is contained in:
Alistair Francis 2021-03-08 13:33:37 -05:00 committed by Lioncash
parent 1551a961ba
commit 12d33edea5

View file

@ -839,12 +839,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;
}