qemu/target
Daniel Henrique Barboza 782ee711be target/riscv/cpu.c: do not run 'host' CPU with TCG
The 'host' CPU is available in a CONFIG_KVM build and it's currently
available for all accels, but is a KVM only CPU. This means that in a
RISC-V KVM capable host we can do things like this:

$ ./build/qemu-system-riscv64 -M virt,accel=tcg -cpu host --nographic
qemu-system-riscv64: H extension requires priv spec 1.12.0

This CPU does not have a priv spec because we don't filter its extensions
via priv spec. We shouldn't be reaching riscv_cpu_realize_tcg() at all
with the 'host' CPU.

We don't have a way to filter the 'host' CPU out of the available CPU
options (-cpu help) if the build includes both KVM and TCG. What we can
do is to error out during riscv_cpu_realize_tcg() if the user chooses
the 'host' CPU with accel=tcg:

$ ./build/qemu-system-riscv64 -M virt,accel=tcg -cpu host --nographic
qemu-system-riscv64: 'host' CPU is not compatible with TCG acceleration

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230721133411.474105-1-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2023-09-11 11:45:54 +10:00
..
alpha target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
arm trivial: Simplify the spots that use TARGET_BIG_ENDIAN as a numeric value 2023-09-08 13:08:52 +03:00
avr target/translate: Include missing 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
cris target/helpers: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
hexagon hexagon: spelling fixes 2023-09-08 13:08:52 +03:00
hppa target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
i386 * only build util/async-teardown.c when system build is requested 2023-09-07 10:29:06 -04:00
loongarch target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
m68k target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
microblaze target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
mips hw/mips: spelling fixes 2023-08-31 19:47:43 +02:00
nios2 target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
openrisc target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
ppc target/ppc: use g_free() in test_opcode_table() 2023-09-08 13:08:52 +03:00
riscv target/riscv/cpu.c: do not run 'host' CPU with TCG 2023-09-11 11:45:54 +10:00
rx include/exec: Replace target_ulong with abi_ptr in cpu_[st|ld]*() 2023-08-24 11:21:46 -07:00
s390x trace-events: Fix the name of the tracing.rst file 2023-09-08 13:08:51 +03:00
sh4 target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
sparc target/translate: Remove unnecessary 'exec/cpu_ldst.h' header 2023-08-31 19:47:43 +02:00
tricore target/tricore: Replace gen_cond_w with tcg_gen_negsetcond_tl 2023-08-24 11:22:42 -07:00
xtensa target/xtensa: Include missing 'qemu/atomic.h' header 2023-08-31 19:47:43 +02:00
Kconfig
meson.build