]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv/kvm: change KVM_REG_RISCV_FP_F to u32
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>
Fri, 8 Dec 2023 18:38:31 +0000 (15:38 -0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 27 Apr 2024 17:03:22 +0000 (20:03 +0300)
commitbbdcc89678daa5cb131ef22a6cd41a5f7f9dcea9
tree8b53ca31f766c76e2338a39d854ac99c0e78edaa
parent8216663a5c88968a62f67e4aa80807167efceb8d
target/riscv/kvm: change KVM_REG_RISCV_FP_F to u32

KVM_REG_RISCV_FP_F regs have u32 size according to the API, but by using
kvm_riscv_reg_id() in RISCV_FP_F_REG() we're returning u64 sizes when
running with TARGET_RISCV64. The most likely reason why no one noticed
this is because we're not implementing kvm_cpu_synchronize_state() in
RISC-V yet.

Create a new helper that returns a KVM ID with u32 size and use it in
RISCV_FP_F_REG().

Reported-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Message-ID: <20231208183835.2411523-2-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
(cherry picked from commit 49c211ffca00fdf7c0c29072c224e88527a14838)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/riscv/kvm/kvm-cpu.c