On 21.11.2024 12:12, Roger Pau Monne wrote: > The allocation of the paging structures in the per-domain area for mapping the > guest GDT and LDT can be limited to the maximum number of vCPUs the guest can > have. The maximum number of vCPUs is available at domain creation since > commit > 4737fa52ce86. > > Limiting to the actual number of vCPUs avoids wasting memory for paging > structures that will never be used. Current logic unconditionally uses 513 > pages, one page for the L3, plus 512 L1 pages. For guests with equal or less > than 16 vCPUs only 2 pages are used (each guest vCPU GDT/LDT can only consume > 32 L1 slots). > > No functional change intended, all possible domain vCPUs should have the GDT > and LDT paging structures allocated and setup at domain creation, just like > before the change. > > Signed-off-by: Roger Pau Monné <roger....@citrix.com>
Reviewed-by: Jan Beulich <jbeul...@suse.com> perhaps with the small adjustment Andrew has asked for. Jan