]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv: Fix exception type when VU accesses supervisor CSRs
authorXu Lu <luxu.kernel@bytedance.com>
Tue, 8 Jul 2025 06:07:20 +0000 (14:07 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 30 Jul 2025 18:00:58 +0000 (21:00 +0300)
commit423a91255c94cef47a19fc9d961a580b88caafa2
treeefc0c1bc533aeef3fe7f6be453e34cfd2a1a14e1
parent093997ee905531424d1b9ad5c653600ca1d7c7a5
target/riscv: Fix exception type when VU accesses supervisor CSRs

When supervisor CSRs are accessed from VU-mode, a virtual instruction
exception should be raised instead of an illegal instruction.

Fixes: c1fbcecb3a (target/riscv: Fix csr number based privilege checking)
Signed-off-by: Xu Lu <luxu.kernel@bytedance.com>
Reviewed-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Nutty Liu <liujingqi@lanxincomputing.com>
Message-ID: <20250708060720.7030-1-luxu.kernel@bytedance.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
(cherry picked from commit 30ef718423e8018723087cd17be0fd9c6dfa2e53)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/riscv/csr.c