@@ -495,6 +495,7 @@ F: include/exec/cpu*.h
F: include/exec/exec-all.h
F: include/exec/target_long.h
F: include/qemu/accel.h
+F: include/qemu/target_info.h
F: include/system/accel-*.h
F: include/system/cpus.h
F: include/accel/accel-cpu-target.h
@@ -503,6 +504,7 @@ F: accel/Makefile.objs
F: accel/stubs/Makefile.objs
F: cpu-common.c
F: cpu-target.c
+F: target_info-defs.c
F: system/cpus.c
Apple Silicon HVF CPUs
@@ -3807,6 +3807,8 @@ endif
common_ss.add(pagevary)
specific_ss.add(files('page-target.c', 'page-vary-target.c'))
+specific_ss.add(files('target_info-defs.c'))
+
subdir('backends')
subdir('disas')
subdir('migration')
new file mode 100644
@@ -0,0 +1,19 @@
+/*
+ * QEMU binary/target helpers
+ *
+ * Copyright (c) Linaro
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef QEMU_TARGET_INFO_H
+#define QEMU_TARGET_INFO_H
+
+/**
+ * target_cpu_type:
+ *
+ * Returns: target CPU base QOM type name (i.e. TYPE_X86_CPU).
+ */
+const char *target_cpu_type(void);
+
+#endif
new file mode 100644
@@ -0,0 +1,16 @@
+/*
+ * QEMU binary/target helpers (target specific)
+ *
+ * Copyright (c) Linaro
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/target_info.h"
+#include "cpu.h"
+
+const char *target_cpu_type(void)
+{
+ return CPU_RESOLVING_TYPE;
+}