Re: [patch V2 16/58] x86/apic: Sanitize num_processors handling

From: Thomas Gleixner
Date: Mon Jul 31 2023 - 11:57:38 EST


On Mon, Jul 31 2023 at 14:50, Thomas Gleixner wrote:
> Why can't XENPV pretend that it has a smp configuration detected,
> i.e. setting smp_found_config as any other special get_smp_config()
> implementation does?

The below should do the trick, no?


--- a/arch/x86/xen/smp_pv.c
+++ b/arch/x86/xen/smp_pv.c
@@ -182,7 +182,8 @@ static void __init _get_smp_config(unsig
if (subtract)
set_nr_cpu_ids(nr_cpu_ids - subtract);
#endif
-
+ /* Pretend to be a proper enumerated system */
+ smp_found_config = 1;
}

static void __init xen_pv_smp_prepare_boot_cpu(void)