mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 05:28:36 -07:00
target/riscv/kvm: add scounteren CSR
Add support for the scounteren KVM CSR. Note that env->scounteren is a 32 bit and all KVM CSRs are target_ulong, so scounteren will be capped to 32 bits read/writes. Reported-by: Andrew Jones <ajones@ventanamicro.com> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20250429124421.223883-10-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
775ac57e0a
commit
8ab99a05f3
1 changed files with 2 additions and 0 deletions
|
|
@ -251,6 +251,7 @@ static KVMCPUConfig kvm_csr_cfgs[] = {
|
|||
KVM_CSR_CFG("stval", stval, RISCV_CSR_REG(stval)),
|
||||
KVM_CSR_CFG("sip", mip, RISCV_CSR_REG(sip)),
|
||||
KVM_CSR_CFG("satp", satp, RISCV_CSR_REG(satp)),
|
||||
KVM_CSR_CFG("scounteren", scounteren, RISCV_CSR_REG(scounteren)),
|
||||
KVM_CSR_CFG("senvcfg", senvcfg, RISCV_CSR_REG(senvcfg)),
|
||||
};
|
||||
|
||||
|
|
@ -701,6 +702,7 @@ static void kvm_riscv_reset_regs_csr(CPURISCVState *env)
|
|||
env->stval = 0;
|
||||
env->mip = 0;
|
||||
env->satp = 0;
|
||||
env->scounteren = 0;
|
||||
env->senvcfg = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue