Re: [RFC PATCH 03/15] accel/hax: Simplify #ifdef'ry

2021-05-26 Thread Richard Henderson
On 5/17/21 4:55 AM, Philippe Mathieu-Daudé wrote: -#ifdef NEED_CPU_H - -#ifdef CONFIG_HAX - -int hax_enabled(void); - -#else /* CONFIG_HAX */ - -#define hax_enabled() (0) - -#endif /* CONFIG_HAX */ - -#endif /* NEED_CPU_H */ +bool hax_enabled(void); Similarly with CONFIG_HAX_IS_POSSIBLE. r~

[RFC PATCH 03/15] accel/hax: Simplify #ifdef'ry

2021-05-17 Thread Philippe Mathieu-Daudé
hax_enabled() is called from: - qemu_init_board() in softmmu/vl.c - qemu_wait_io_event() in softmmu/cpus.c - apic_common_realize() in hw/intc/apic_common.c By converting macros to a function, we can remove the NEED_CPU_H dependency and build softmmu/cpus.c once for all targets. Signed-off-by: