Hi,

On 11/5/26 21:06, Richard Henderson wrote:
Signed-off-by: Richard Henderson <[email protected]>
---
  include/qemu/target-info-impl.h   | 43 -------------------------------
  include/qemu/target-info-qom.h    |  2 +-
  include/qemu/target-info.h        | 31 ++++++++++++++++++++++
  configs/targets/aarch64-softmmu.c |  2 +-
  configs/targets/arm-softmmu.c     |  2 +-
  page-vary-common.c                |  2 +-
  page-vary-system.c                |  2 +-
  target-info-qom.c                 |  2 +-
  target-info-stub.c                |  1 -
  target-info.c                     |  1 -
  10 files changed, 37 insertions(+), 51 deletions(-)
  delete mode 100644 include/qemu/target-info-impl.h


diff --git a/include/qemu/target-info.h b/include/qemu/target-info.h
index 23c997de54..c9f7f2aa26 100644
--- a/include/qemu/target-info.h
+++ b/include/qemu/target-info.h
@@ -9,6 +9,37 @@
  #ifndef QEMU_TARGET_INFO_H
  #define QEMU_TARGET_INFO_H
+#include "qapi/qapi-types-common.h"
+#include "qapi/qapi-types-machine.h"

Per commit 0af00042a92 ("qemu/target-info: Factor target_arch() out"):

    Keeping native types in "qemu/target-info.h" is necessary
    to keep building tests such tests/tcg/plugins/mem.c, as
    per the comment added in commit ecbcc9ead2f ("tests/tcg:
    add a system test to check memory instrumentation"):

    /*
     * plugins should not include anything from QEMU aside from the
     * API header. However as this is a test plugin to exercise the
     * internals of QEMU and we want to avoid needless code duplication
     * we do so here. bswap.h is pretty self-contained although it needs
     * a few things provided by compiler.h.
     */

Is that no longuer necessary?

+typedef struct TargetInfo {
+    /* runtime equivalent of TARGET_NAME definition */
+    const char *target_name;
+    /* related to TARGET_ARCH definition */
+    SysEmuTarget target_arch;
+    /* runtime equivalent of TARGET_LONG_BITS definition */
+    unsigned long_bits;
+    /* runtime equivalent of CPU_RESOLVING_TYPE definition */
+    const char *cpu_type;
+    /* QOM typename machines for this binary must implement */
+    const char *machine_typename;
+    /* related to TARGET_BIG_ENDIAN definition */
+    EndianMode endianness;
+    /*
+     * runtime equivalent of
+     *   TARGET_PAGE_BITS_VARY ? TARGET_PAGE_BITS_LEGACY : TARGET_PAGE_BITS
+     */
+    unsigned page_bits_init;
+    /* runtime equivalent of TARGET_PAGE_BITS_VARY definition */
+    bool page_bits_vary;
+} TargetInfo;

Reply via email to