Under multi-target qemu, target may not selected when call to qemu_arch_available, return true for that.
Signed-off-by: Yonggang Luo <[email protected]> --- system/arch_init.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/system/arch_init.c b/system/arch_init.c index b8362b12a6d..5424ef8cf24 100644 --- a/system/arch_init.c +++ b/system/arch_init.c @@ -24,9 +24,17 @@ #include "qemu/osdep.h" #include "qemu/base-arch-defs.h" #include "qemu/bitops.h" +#include "qemu/target-info.h" +#include "qemu/target-info-def.h" #include "qemu/target-info-qapi.h" bool qemu_arch_available(uint64_t arch_bitmask) { + if (target_combined_binary()) { + /* Allow all architectures until machine selection sets TargetInfo. */ + if (!target_info()) { + return true; + } + } return extract64(arch_bitmask, target_arch(), 1); } -- 2.55.0.windows.3
