Hi Mohamed,
On 31/7/25 07:27, Mohamed Mediouni wrote:
> We aren't using it on arm64.
>
> Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
> ---
> accel/whpx/whpx-common.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/accel/whpx/whpx-common.c b/accel/whpx/whpx-common.c
> index 0b23deb7c4..43d0200afd 100644
> --- a/accel/whpx/whpx-common.c
> +++ b/accel/whpx/whpx-common.c
> @@ -486,9 +486,10 @@ static void whpx_set_kernel_irqchip(Object *obj, Visitor *v,
>
> static void whpx_cpu_accel_class_init(ObjectClass *oc, const void *data)
> {
> +#ifdef __x86_64__
> AccelCPUClass *acc = ACCEL_CPU_CLASS(oc);
> -
> acc->cpu_instance_init = whpx_cpu_instance_init;
> +#endif
> }
I'd rather keep whpx-*common* without any #ifdef'ry: add hooks
when architecture-specific code need to be handled, and add empty
arch stub when nothing to be done there (preferably with a comment
in the stub).