]> xenbits.xensource.com Git - qemu-xen.git/commit
target/riscv: Enforce WARL behavior for scounteren/hcounteren
authorAtish Patra <atishp@rivosinc.com>
Thu, 11 Jul 2024 22:31:12 +0000 (15:31 -0700)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 18 Jul 2024 02:08:44 +0000 (12:08 +1000)
commit8cff74c26dbdfc746d8f0165c233be3d396d4572
treeda6de2e9cd89e56ddbc401d09684cf27e9bcaffa
parent46023470e014234f3e15ec4497e003550bd7da0d
target/riscv: Enforce WARL behavior for scounteren/hcounteren

scounteren/hcountern are also WARL registers similar to mcountern.
Only set the bits for the available counters during the write to
preserve the WARL behavior.

Signed-off-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20240711-smcntrpmf_v7-v8-9-b7c38ae7b263@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/csr.c