@@ -294,7 +294,7 @@ S390 TCG CPUs
M: Richard Henderson <richard.henderson@linaro.org>
M: David Hildenbrand <david@redhat.com>
S: Maintained
-F: target/s390x/
+F: target/s390x/tcg
F: hw/s390x/
F: disas/s390.c
F: tests/tcg/s390x/
@@ -16,7 +16,7 @@
#include "qemu/cutils.h"
#include "qemu/module.h"
#include "cpu.h"
-#include "tcg_s390x.h"
+#include "tcg/tcg_s390x.h"
static void qemu_s390_tod_get(const S390TODState *td, S390TOD *tod,
Error **errp)
@@ -12,7 +12,7 @@
#define HW_S390_TOD_H
#include "hw/qdev-core.h"
-#include "target/s390x/s390-tod.h"
+#include "tcg/s390-tod.h"
#include "qom/object.h"
typedef struct S390TOD {
@@ -13,7 +13,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "elf.h"
#include "sysemu/dump.h"
@@ -23,7 +23,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "kvm_s390x.h"
#include "sysemu/kvm.h"
#include "sysemu/reset.h"
@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "kvm_s390x.h"
#include "sysemu/kvm.h"
#include "sysemu/tcg.h"
@@ -14,7 +14,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "hw/watchdog/wdt_diag288.h"
#include "sysemu/cpus.h"
#include "hw/s390x/ipl.h"
@@ -20,7 +20,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "exec/exec-all.h"
#include "exec/gdbstub.h"
#include "qemu/bitops.h"
@@ -20,7 +20,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "exec/gdbstub.h"
#include "qemu/timer.h"
#include "qemu/qemu-print.h"
@@ -10,12 +10,12 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "kvm_s390x.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "exec/exec-all.h"
#include "sysemu/kvm.h"
#include "sysemu/tcg.h"
#include "hw/s390x/ioinst.h"
-#include "tcg_s390x.h"
+#include "tcg/tcg_s390x.h"
#if !defined(CONFIG_USER_ONLY)
#include "hw/s390x/s390_flic.h"
#endif
@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "hw/s390x/ioinst.h"
#include "trace.h"
#include "hw/s390x/s390-pci-bus.h"
@@ -26,7 +26,7 @@
#include "qemu-common.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "kvm_s390x.h"
#include "sysemu/kvm_int.h"
#include "qemu/cutils.h"
@@ -16,10 +16,10 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "kvm_s390x.h"
#include "migration/vmstate.h"
-#include "tcg_s390x.h"
+#include "tcg/tcg_s390x.h"
#include "sysemu/kvm.h"
#include "sysemu/tcg.h"
@@ -8,21 +8,6 @@ s390x_ss.add(files(
'interrupt.c',
))
-s390x_ss.add(when: 'CONFIG_TCG', if_true: files(
- 'cc_helper.c',
- 'crypto_helper.c',
- 'excp_helper.c',
- 'fpu_helper.c',
- 'int_helper.c',
- 'mem_helper.c',
- 'misc_helper.c',
- 'translate.c',
- 'vec_fpu_helper.c',
- 'vec_helper.c',
- 'vec_int_helper.c',
- 'vec_string_helper.c',
-))
-
s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c'))
gen_features = executable('gen-features', 'gen-features.c', native: true,
@@ -60,6 +45,8 @@ endif
s390x_user_ss = ss.source_set()
+subdir('tcg')
+
target_arch += {'s390x': s390x_ss}
target_softmmu_arch += {'s390x': s390x_softmmu_ss}
target_user_arch += {'s390x': s390x_user_ss}
@@ -19,7 +19,7 @@
#include "qemu/error-report.h"
#include "exec/address-spaces.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "kvm_s390x.h"
#include "sysemu/kvm.h"
#include "sysemu/tcg.h"
similarity index 98%
rename from target/s390x/internal.h
rename to target/s390x/s390x-internal.h
@@ -244,6 +244,12 @@ void load_psw(CPUS390XState *env, uint64_t mask, uint64_t addr);
#ifndef CONFIG_USER_ONLY
unsigned int s390_cpu_halt(S390CPU *cpu);
void s390_cpu_unhalt(S390CPU *cpu);
+void s390_cpu_init_sysemu(Object *obj);
+bool s390_cpu_realize_sysemu(DeviceState *dev, Error **errp);
+void s390_cpu_finalize(Object *obj);
+void s390_cpu_class_init_sysemu(CPUClass *cc);
+void s390_cpu_machine_reset_cb(void *opaque);
+
#else
static inline unsigned int s390_cpu_halt(S390CPU *cpu)
{
@@ -10,7 +10,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "sysemu/hw_accel.h"
#include "sysemu/runstate.h"
#include "exec/address-spaces.h"
similarity index 99%
rename from target/s390x/cc_helper.c
rename to target/s390x/tcg/cc_helper.c
@@ -20,7 +20,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "tcg_s390x.h"
#include "exec/exec-all.h"
#include "exec/helper-proto.h"
similarity index 98%
rename from target/s390x/crypto_helper.c
rename to target/s390x/tcg/crypto_helper.c
@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
#include "qemu/main-loop.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "tcg_s390x.h"
#include "exec/helper-proto.h"
#include "exec/exec-all.h"
similarity index 99%
rename from target/s390x/excp_helper.c
rename to target/s390x/tcg/excp_helper.c
@@ -20,7 +20,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "exec/helper-proto.h"
#include "qemu/timer.h"
#include "exec/exec-all.h"
similarity index 99%
rename from target/s390x/fpu_helper.c
rename to target/s390x/tcg/fpu_helper.c
@@ -20,7 +20,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "tcg_s390x.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h"
similarity index 100%
rename from target/s390x/insn-data.def
rename to target/s390x/tcg/insn-data.def
similarity index 100%
rename from target/s390x/insn-format.def
rename to target/s390x/tcg/insn-format.def
similarity index 99%
rename from target/s390x/int_helper.c
rename to target/s390x/tcg/int_helper.c
@@ -20,7 +20,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "tcg_s390x.h"
#include "exec/exec-all.h"
#include "qemu/host-utils.h"
similarity index 99%
rename from target/s390x/mem_helper.c
rename to target/s390x/tcg/mem_helper.c
@@ -20,7 +20,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "tcg_s390x.h"
#include "exec/helper-proto.h"
#include "exec/exec-all.h"
new file mode 100644
@@ -0,0 +1,14 @@
+s390x_ss.add(when: 'CONFIG_TCG', if_true: files(
+ 'cc_helper.c',
+ 'crypto_helper.c',
+ 'excp_helper.c',
+ 'fpu_helper.c',
+ 'int_helper.c',
+ 'mem_helper.c',
+ 'misc_helper.c',
+ 'translate.c',
+ 'vec_fpu_helper.c',
+ 'vec_helper.c',
+ 'vec_int_helper.c',
+ 'vec_string_helper.c',
+))
similarity index 99%
rename from target/s390x/misc_helper.c
rename to target/s390x/tcg/misc_helper.c
@@ -22,7 +22,7 @@
#include "qemu/cutils.h"
#include "qemu/main-loop.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "exec/memory.h"
#include "qemu/host-utils.h"
#include "exec/helper-proto.h"
similarity index 100%
rename from target/s390x/s390-tod.h
rename to target/s390x/tcg/s390-tod.h
similarity index 100%
rename from target/s390x/tcg_s390x.h
rename to target/s390x/tcg/tcg_s390x.h
similarity index 99%
rename from target/s390x/translate.c
rename to target/s390x/tcg/translate.c
@@ -30,7 +30,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "disas/disas.h"
#include "exec/exec-all.h"
#include "tcg/tcg-op.h"
similarity index 100%
rename from target/s390x/translate_vx.c.inc
rename to target/s390x/tcg/translate_vx.c.inc
similarity index 100%
rename from target/s390x/vec.h
rename to target/s390x/tcg/vec.h
similarity index 99%
rename from target/s390x/vec_fpu_helper.c
rename to target/s390x/tcg/vec_fpu_helper.c
@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "vec.h"
#include "tcg_s390x.h"
#include "tcg/tcg-gvec-desc.h"
similarity index 99%
rename from target/s390x/vec_helper.c
rename to target/s390x/tcg/vec_helper.c
@@ -11,7 +11,7 @@
*/
#include "qemu/osdep.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "vec.h"
#include "tcg/tcg.h"
#include "tcg/tcg-gvec-desc.h"
similarity index 100%
rename from target/s390x/vec_int_helper.c
rename to target/s390x/tcg/vec_int_helper.c
similarity index 99%
rename from target/s390x/vec_string_helper.c
rename to target/s390x/tcg/vec_string_helper.c
@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "cpu.h"
-#include "internal.h"
+#include "s390x-internal.h"
#include "vec.h"
#include "tcg/tcg.h"
#include "tcg/tcg-gvec-desc.h"