diff options
| author | Yu-Ming Chang <yumin686@andestech.com> | 2024-03-08 15:48:03 +0800 |
|---|---|---|
| committer | Alistair Francis <alistair.francis@wdc.com> | 2024-07-18 12:08:45 +1000 |
| commit | 38c83e8d3a333b8b377367756a2b6c700c7d0084 (patch) | |
| tree | 40db608999be38ef578f2960d94840017240bbcb /hw/vfio/container.c | |
| parent | 6f6592d62ebaffff353bdd27ec4480972695d24b (diff) | |
| download | focaccia-qemu-38c83e8d3a333b8b377367756a2b6c700c7d0084.tar.gz focaccia-qemu-38c83e8d3a333b8b377367756a2b6c700c7d0084.zip | |
target/riscv: raise an exception when CSRRS/CSRRC writes a read-only CSR
Both CSRRS and CSRRC always read the addressed CSR and cause any read side effects regardless of rs1 and rd fields. Note that if rs1 specifies a register holding a zero value other than x0, the instruction will still attempt to write the unmodified value back to the CSR and will cause any attendant side effects. So if CSRRS or CSRRC tries to write a read-only CSR with rs1 which specifies a register holding a zero value, an illegal instruction exception should be raised. Signed-off-by: Yu-Ming Chang <yumin686@andestech.com> Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <172100444279.18077.6893072378718059541-0@git.sr.ht> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/vfio/container.c')
0 files changed, 0 insertions, 0 deletions