On 24.09.2025 16:25, Oleksii Kurochko wrote:
>
> On 9/19/25 11:26 PM, Jan Beulich wrote:
>> On 17.09.2025 23:55, Oleksii Kurochko wrote:
>>> @@ -151,6 +152,8 @@ void __init noreturn start_xen(unsigned long bootcpu_id,
>>>
>>> gstage_mode_detect();
>>>
>>> + vmid_init();
>> Like for the earlier patch, I'm not convinced this is a function good
>> to call from the top-level start_xen(). The two functions sitting side
>> by side actually demonstrates the scalability issue pretty well.
>
> In the case of vmid_init(), it could be a good place to call it here since
> vmid_init() is expected to be called once when a pCPU is booted. For the boot
> CPU, all "setup" functions are called in start_xen(), so vmid_init() could
> potentially be called there as well.
>
> For other (non-boot) CPUs, vmid_init() could be called somewhere in the
> __cpu_up() code or at the CPU’s entry point.
And then perhaps many more functions. This simply doesn't scale well. See
how we have hvm_enable() for the boot CPU part of this, and then
{svm,vmx}_cpu_up() for the secondary CPUs.
Jan