mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
tcg: Convert TARGET_SUPPORTS_MTTCG to TCGCPUOps::mttcg_supported field
Instead of having a compile-time TARGET_SUPPORTS_MTTCG definition, have each target set the 'mttcg_supported' field in the TCGCPUOps structure. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Anton Johansson <anjo@rev.ng> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250405161320.76854-17-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
committed by
Richard Henderson
parent
a522b04bb9
commit
a3d40b5eff
+5
-6
@@ -41,8 +41,9 @@
|
||||
#include "hw/boards.h"
|
||||
#include "system/tcg.h"
|
||||
#endif
|
||||
#include "accel/tcg/cpu-ops.h"
|
||||
#include "internal-common.h"
|
||||
#include "cpu-param.h"
|
||||
#include "cpu.h"
|
||||
|
||||
|
||||
struct TCGState {
|
||||
@@ -88,11 +89,9 @@ static int tcg_init_machine(MachineState *ms)
|
||||
unsigned max_threads = 1;
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
# ifdef TARGET_SUPPORTS_MTTCG
|
||||
bool mttcg_supported = true;
|
||||
# else
|
||||
bool mttcg_supported = false;
|
||||
# endif
|
||||
CPUClass *cc = CPU_CLASS(object_class_by_name(CPU_RESOLVING_TYPE));
|
||||
bool mttcg_supported = cc->tcg_ops->mttcg_supported;
|
||||
|
||||
switch (s->mttcg_enabled) {
|
||||
case ON_OFF_AUTO_AUTO:
|
||||
/*
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
TARGET_ARCH=aarch64
|
||||
TARGET_BASE_ARCH=arm
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_KVM_HAVE_GUEST_DEBUG=y
|
||||
TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-vfp-sysregs.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml gdb-xml/arm-m-profile-mve.xml gdb-xml/aarch64-pauth.xml
|
||||
# needed by boot.c
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
TARGET_ARCH=alpha
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_LONG_BITS=64
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
TARGET_ARCH=arm
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_XML_FILES= gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-vfp-sysregs.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml gdb-xml/arm-m-profile-mve.xml
|
||||
# needed by boot.c
|
||||
TARGET_NEED_FDT=y
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
TARGET_ARCH=hppa
|
||||
TARGET_BIG_ENDIAN=y
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_LONG_BITS=64
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
TARGET_ARCH=i386
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_KVM_HAVE_GUEST_DEBUG=y
|
||||
TARGET_KVM_HAVE_RESET_PARKED_VCPU=y
|
||||
TARGET_XML_FILES= gdb-xml/i386-32bit.xml
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
TARGET_ARCH=loongarch64
|
||||
TARGET_BASE_ARCH=loongarch
|
||||
TARGET_KVM_HAVE_GUEST_DEBUG=y
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_XML_FILES= gdb-xml/loongarch-base32.xml gdb-xml/loongarch-base64.xml gdb-xml/loongarch-fpu.xml gdb-xml/loongarch-lsx.xml gdb-xml/loongarch-lasx.xml
|
||||
# all boards require libfdt
|
||||
TARGET_NEED_FDT=y
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
TARGET_ARCH=microblaze
|
||||
TARGET_BIG_ENDIAN=y
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
# needed by boot.c
|
||||
TARGET_NEED_FDT=y
|
||||
TARGET_XML_FILES=gdb-xml/microblaze-core.xml gdb-xml/microblaze-stack-protect.xml
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
TARGET_ARCH=microblaze
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
# needed by boot.c
|
||||
TARGET_NEED_FDT=y
|
||||
TARGET_XML_FILES=gdb-xml/microblaze-core.xml gdb-xml/microblaze-stack-protect.xml
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
TARGET_ARCH=mips
|
||||
TARGET_BIG_ENDIAN=y
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_LONG_BITS=32
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
TARGET_ARCH=mips
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_LONG_BITS=32
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
TARGET_ARCH=openrisc
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_BIG_ENDIAN=y
|
||||
# needed by boot.c and all boards
|
||||
TARGET_NEED_FDT=y
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
TARGET_ARCH=ppc64
|
||||
TARGET_BASE_ARCH=ppc
|
||||
TARGET_BIG_ENDIAN=y
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_KVM_HAVE_GUEST_DEBUG=y
|
||||
TARGET_XML_FILES= gdb-xml/power64-core.xml gdb-xml/power-fpu.xml gdb-xml/power-altivec.xml gdb-xml/power-spe.xml gdb-xml/power-vsx.xml
|
||||
# all boards require libfdt
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
TARGET_ARCH=riscv32
|
||||
TARGET_BASE_ARCH=riscv
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_XML_FILES= gdb-xml/riscv-32bit-cpu.xml gdb-xml/riscv-32bit-fpu.xml gdb-xml/riscv-64bit-fpu.xml gdb-xml/riscv-32bit-virtual.xml
|
||||
# needed by boot.c
|
||||
TARGET_NEED_FDT=y
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
TARGET_ARCH=riscv64
|
||||
TARGET_BASE_ARCH=riscv
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_KVM_HAVE_GUEST_DEBUG=y
|
||||
TARGET_XML_FILES= gdb-xml/riscv-64bit-cpu.xml gdb-xml/riscv-32bit-fpu.xml gdb-xml/riscv-64bit-fpu.xml gdb-xml/riscv-64bit-virtual.xml gdb-xml/riscv-32bit-cpu.xml gdb-xml/riscv-32bit-virtual.xml
|
||||
# needed by boot.c
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
TARGET_ARCH=s390x
|
||||
TARGET_BIG_ENDIAN=y
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_KVM_HAVE_GUEST_DEBUG=y
|
||||
TARGET_XML_FILES= gdb-xml/s390x-core64.xml gdb-xml/s390-acr.xml gdb-xml/s390-fpr.xml gdb-xml/s390-vx.xml gdb-xml/s390-cr.xml gdb-xml/s390-virt.xml gdb-xml/s390-virt-kvm.xml gdb-xml/s390-gs.xml
|
||||
TARGET_LONG_BITS=64
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
TARGET_ARCH=sparc
|
||||
TARGET_BIG_ENDIAN=y
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_LONG_BITS=32
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
TARGET_ARCH=sparc64
|
||||
TARGET_BASE_ARCH=sparc
|
||||
TARGET_BIG_ENDIAN=y
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_LONG_BITS=64
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
TARGET_ARCH=x86_64
|
||||
TARGET_BASE_ARCH=i386
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_KVM_HAVE_GUEST_DEBUG=y
|
||||
TARGET_KVM_HAVE_RESET_PARKED_VCPU=y
|
||||
TARGET_XML_FILES= gdb-xml/i386-64bit.xml
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
TARGET_ARCH=xtensa
|
||||
TARGET_SUPPORTS_MTTCG=y
|
||||
TARGET_LONG_BITS=32
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user