On 10/26/2026 10:15 PM, Yonggang Luo wrote:
> QEMU_ARCH_* was defined as (1UL << target). unsigned long is 32 bits
> on Windows and 64 bits on LP64 hosts, so the mask width depended on
> the host data model. Define the bits with 1ULL and store every
> arch_bitmask as uint64_t.
> SYS_EMU_TARGET__MAX is already 29. With a 32-bit mask, __MAX has to
> stay at most 31, so there is almost no room for new targets. A
> uint64_t mask raises that ceiling to 63. It stays 63, rather than
> 64, so the all-targets mask still fits in the int64_t range used by
> qemu_opt_set_number().
>
> Yonggang Luo (3):
> qemu/base-arch-defs: extract QEMU_ARCH_BIT for QEMU_ARCH_* enums
> qemu: Use SYS_EMU_TARGET__MAX to define QEMU_ARCH_ALL
> qemu: increase width of QEMU_ARCH_* masks enums to be 64 bits
>
> include/qemu/base-arch-defs.h | 67 ++++++++++++++++++----------------
> monitor/monitor-hmp-internal.h | 2 +-
> system/arch_init.c | 4 +-
> system/qdev-monitor.c | 2 +-
> system/vl.c | 2 +-
> 5 files changed, 40 insertions(+), 37 deletions(-)
>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>