For now, this function strictly returns false. We'll turn it to true
once heterogeneous emulation in supported. Meanwhile, we can use this to
add various checks and asserts over the codebase as reminders about what
we'll need to modify.

Signed-off-by: Pierrick Bouvier <[email protected]>
---
 include/qemu/target-info.h | 8 ++++++++
 target-info.c              | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/include/qemu/target-info.h b/include/qemu/target-info.h
index 862097c6c63..923c00c917c 100644
--- a/include/qemu/target-info.h
+++ b/include/qemu/target-info.h
@@ -42,6 +42,14 @@ const char *target_cpu_type(void);
  */
 bool target_big_endian(void);
 
+/**
+ * target_heterogeneous:
+ *
+ * Returns true if current binary has support for running several target
+ * architectures at once (heterogeneous emulation).
+ */
+bool target_heterogeneous(void);
+
 /**
  * target_base_arm:
  *
diff --git a/target-info.c b/target-info.c
index 254530d8ea5..b8a4a7ebf7a 100644
--- a/target-info.c
+++ b/target-info.c
@@ -42,6 +42,12 @@ bool target_big_endian(void)
     return target_endian_mode() == ENDIAN_MODE_BIG;
 }
 
+bool target_heterogeneous(void)
+{
+    /* For now, we only run a single target at a time */
+    return false;
+}
+
 bool target_base_arm(void)
 {
     switch (target_arch()) {
-- 
2.47.3


Reply via email to