Re: [patch V3 02/40] x86/apic: Fake primary thread mask for XEN/PV

From: Thomas Gleixner
Date: Fri Aug 04 2023 - 16:03:08 EST


On Fri, Aug 04 2023 at 20:12, Borislav Petkov wrote:
>> @@ -2344,6 +2346,15 @@ static int __init smp_init_primary_threa
>> {
>> unsigned int cpu;
>>
>> + /*
>> + * XEN/PV provides either none or useless topology information.
>> + * Pretend that all vCPUs are primary threads.
>> + */
>> + if (xen_pv_domain()) {
>> + cpumask_copy(&__cpu_primary_thread_mask, cpu_possible_mask);
>> + return 0;
>> + }
>
> Can this be somewhere in the Xen init code instead?

Not for now. That's all going away with the 3rd installment. But right
now it's the right place to be.