xemu/target
Daniel Henrique Barboza bd30559568 target/riscv/cpu.c: add priv_spec validate/disable_exts helpers
We're doing env->priv_spec validation and assignment at the start of
riscv_cpu_realize(), which is fine, but then we're doing a force disable
on extensions that aren't compatible with the priv version.

This second step is being done too early. The disabled extensions might be
re-enabled again in riscv_cpu_validate_set_extensions() by accident. A
better place to put this code is at the end of
riscv_cpu_validate_set_extensions() after all the validations are
completed.

Add a new helper, riscv_cpu_disable_priv_spec_isa_exts(), to disable the
extesions after the validation is done. While we're at it, create a
riscv_cpu_validate_priv_spec() helper to host all env->priv_spec related
validation to unclog riscv_cpu_realize a bit.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230517135714.211809-8-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2023-06-13 17:02:19 +10:00
..
alpha accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
arm target/arm: Only include tcg/oversized-guest.h if CONFIG_TCG 2023-06-07 08:35:13 -07:00
avr accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
cris accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
hexagon target/*: Add missing includes of exec/translation-block.h 2023-06-05 12:04:29 -07:00
hppa accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
i386 hvf: add guest debugging handlers for Apple Silicon hosts 2023-06-06 10:19:30 +01:00
loongarch target/*: Add missing includes of exec/translation-block.h 2023-06-05 12:04:29 -07:00
m68k target/m68k/fpu_helper: Use FloatRelation enum to hold comparison result 2023-06-09 23:38:16 +03:00
microblaze accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
mips target/*: Add missing includes of exec/translation-block.h 2023-06-05 12:04:29 -07:00
nios2 accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
openrisc accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
ppc target/ppc: Implement gathering irq statistics 2023-06-10 10:19:24 -03:00
riscv target/riscv/cpu.c: add priv_spec validate/disable_exts helpers 2023-06-13 17:02:19 +10:00
rx accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
s390x * Fix emulated LCCB, LOCFHR, MXDB and MXDBR s390x instructions 2023-06-06 07:07:37 -07:00
sh4 accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
sparc accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
tricore target/tricore: Fix wrong PSW for call insns 2023-06-07 18:20:48 +02:00
xtensa accel/tcg: Introduce translator_io_start 2023-06-05 12:04:29 -07:00
Kconfig hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00
meson.build target/loongarch: Add target build suport 2022-06-06 18:09:03 +00:00