On Thu, Apr 25, 2024 at 11:42:01AM +0100, Alejandro Vallejo wrote:
> Hi,
> 
> On 25/04/2024 08:31, Gerd Hoffmann wrote:
> > On Wed, Apr 24, 2024 at 02:36:32PM +0100, Alejandro Vallejo wrote:
> >> Bump the compile-time constant for maximum processor count from 64 to 128
> >> in order to allow that many vCPUs to be brought online on Xen guests with
> >> the default OVMF configuration.
> > 
> >> +  # UefiCpuPkg PCDs related to initial AP bringup and general AP 
> >> management.
> >> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber|128
> > 
> > Note that this is a dynamic PCD, so you can set it at runtime to the
> > number of vcpus present in the VM.  See MaxCpuCountInitialization() in
> > OvmfPkg/PlatformPei/Platform.c for example.
> > 
> > take care,
> >   Gerd
> > 
> 
> Thanks for the heads up. Do you mean setting it at runtime through
> fw_cfg? I saw PlatformMaxCpuCountInitialization() providing some
> customizability, but Xen's toolstack doesn't provide fw_cfg at the
> moment so it can't (as far as I've seen) use it.

We don't need fw_cfg to set a PCD at runtime.

It's a bit more complicated than setting it at build time, but we can
always ask Xen how many vcpu we have and set the PCD accordingly. This
is something that can happen in OvmfPkg/XenPlatformPei module.

But to be honest, I don't know if it's worth it, because I don't know the
downside of having a higher value for PcdCpuMaxLogicalProcessorNumber.

Cheers,

-- 
Anthony PERARD


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118304): https://edk2.groups.io/g/devel/message/118304
Mute This Topic: https://groups.io/mt/105721898/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to