On Mon, Jul 07, 2025 at 07:19:56PM +0200, Philippe Mathieu-Daudé wrote:
> Date: Mon,  7 Jul 2025 19:19:56 +0200
> From: Philippe Mathieu-Daudé <phi...@linaro.org>
> Subject: [PATCH-for-10.1 v6 02/14] qemu/target-info: Factor target_arch()
>  out
> X-Mailer: git-send-email 2.49.0
> 
> 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: Zhao Liu <zhao1....@intel.com>


Reply via email to