On 7/7/25 11:19, Philippe Mathieu-Daudé wrote:
To keep "qemu/target-info.h" self-contained to native
types, declare target_arch() -- which returns a QAPI
type -- in "qemu/target-info-qapi.h".

No logical change.

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.
  */

Signed-off-by: Philippe Mathieu-Daudé<phi...@linaro.org>
---
  include/qemu/target-info-qapi.h | 21 +++++++++++++++++++++
  include/qemu/target-info.h      |  2 +-
  hw/core/machine-qmp-cmds.c      |  8 +++-----
  target-info.c                   |  8 ++++++++
  4 files changed, 33 insertions(+), 6 deletions(-)
  create mode 100644 include/qemu/target-info-qapi.h

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to