]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv/tcg: decouple profile enablement from user prop
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>
Wed, 28 May 2025 18:44:06 +0000 (15:44 -0300)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 4 Jul 2025 11:09:48 +0000 (21:09 +1000)
commitf655704c3dfefd57172e3347c22aca18283ee2b7
tree56ff080337fd33a383325e5e26e6fb9b895f8c80
parenta429f9304d54e9a44773b753d0844204b4b3b22f
target/riscv/tcg: decouple profile enablement from user prop

We have code in riscv_cpu_add_profiles() to enable a profile right away
in case a CPU chose the profile during its cpu_init(). But we're using
the user callback option to do so, setting profile->user_set.

Create a new helper that does all the grunt work to enable/disable a
given profile. Use this new helper in the cases where we want a CPU to
be compatible to a certain profile, leaving the user callback to be used
exclusively by users.

Fixes: fba92a92e3 ("target/riscv: add 'rva22u64' CPU")
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Björn Töpel <bjorn@rivosinc.com>
Tested-by: Björn Töpel <bjorn@rivosinc.com>
Message-ID: <20250528184407.1451983-3-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/tcg/tcg-cpu.c