diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-07-08 23:53:14 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-07-15 02:56:39 -0400 |
| commit | 536613be40c7005a956a52487c1fed4530d6613f (patch) | |
| tree | da9d445f9b0c77e89a4d933ce91d8257294008c9 /target-info.c | |
| parent | 0af00042a9290626e3c9f05cdc35b6e3d62ecd49 (diff) | |
| download | focaccia-qemu-536613be40c7005a956a52487c1fed4530d6613f.tar.gz focaccia-qemu-536613be40c7005a956a52487c1fed4530d6613f.zip | |
qemu/target-info: Add %target_arch field to TargetInfo
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20250708215320.70426-4-philmd@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'target-info.c')
| -rw-r--r-- | target-info.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/target-info.c b/target-info.c index 9ebabec988..8e29553b4e 100644 --- a/target-info.c +++ b/target-info.c @@ -24,8 +24,13 @@ unsigned target_long_bits(void) SysEmuTarget target_arch(void) { - return qapi_enum_parse(&SysEmuTarget_lookup, target_name(), -1, - &error_abort); + SysEmuTarget arch = target_info()->target_arch; + + if (arch == SYS_EMU_TARGET__MAX) { + arch = qapi_enum_parse(&SysEmuTarget_lookup, target_name(), -1, + &error_abort); + } + return arch; } const char *target_cpu_type(void) |