diff options
author | Daniel Henrique Barboza <dbarboza@ventanamicro.com> | 2025-04-29 09:44:20 -0300 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2025-05-19 13:42:47 +1000 |
commit | 775ac57e0a54b9127bd2ad005675772870cd1932 (patch) | |
tree | 4bd0899dbf1106d019a33f4f711b7ec818378b36 /python | |
parent | 86b8c3821496898cd3bd8eaa1bac71f5c784a2db (diff) | |
download | qemu-775ac57e0a54b9127bd2ad005675772870cd1932.zip qemu-775ac57e0a54b9127bd2ad005675772870cd1932.tar.gz qemu-775ac57e0a54b9127bd2ad005675772870cd1932.tar.bz2 |
target/riscv/kvm: read/write KVM regs via env size
We're going to add support for scounteren in the next patch. KVM defines
as a target_ulong CSR, while QEMU defines env->scounteren as a 32 bit
field. This will cause the current code to read/write a 64 bit CSR in a
32 bit field when running in a 64 bit CPU.
To prevent that, change the current logic to honor the size of the QEMU
storage instead of the KVM CSR reg.
Suggested-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Message-ID: <20250429124421.223883-9-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'python')
0 files changed, 0 insertions, 0 deletions