qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] pc: q35: Bump max_cpus to 1024


From: Daniel P . Berrangé
Subject: Re: [PATCH v2] pc: q35: Bump max_cpus to 1024
Date: Thu, 1 Jun 2023 11:17:30 +0100
User-agent: Mutt/2.2.9 (2022-11-12)

On Thu, Jun 01, 2023 at 11:09:45AM +0100, Joao Martins wrote:
> 
> 
> On 31/05/2023 23:51, Suravee Suthikulpanit wrote:
> > Since KVM_MAX_VCPUS is currently defined to 1024 for x86 as shown in
> > arch/x86/include/asm/kvm_host.h, update QEMU limits to the same number.
> > 
> > In case KVM could not support the specified number of vcpus, QEMU would
> > return the following error message:
> > 
> >   qemu-system-x86_64: kvm_init_vcpu: kvm_get_vcpu failed (xxx): Invalid 
> > argument
> > 
> > Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> > ---
> > 
> > Changes from V1:
> > (https://lore.kernel.org/all/YnkDGsIi1vFvXmiP@redhat.com/T/)
> >  * Bump from 512 to KVM_MAX_VCPUS (per Igor's suggestion)
> > 
> > Note:
> >  From the last discussion, Daniel mentioned that SMBIO 2.1 tables might
> >  cause overflow at approx 720 CPUs, and it might require using the
> >  SMBIO 3.0 entry point. Also, we might need to change the default for
> >  the x86 machine type to SMBIO 3.0. However, I do not know the status
> >  of this.
> > 
> I suspect smbios 3.0 (64-bit entry point) is already supported.
> 
> With current qemu and all the smbios fixes in the last cycle, perhaps this is
> mainly just setting smbios_entry_point_type to SMBIOS_ENTRY_POINT_TYPE_64 if
> MachineState::smp::max_cpus is bigger than 720 (e.g. in pc_q35_init()?)

The need for the 64-bit entry point depends on a combination of RAM config
and CPU count. IMHO we need to unconditionally switch the latest machine
types to use the 64-bit entry point by default, rather than trying to infer
some special condition to dynamically change on the fly.

Before doing that we need confirmation that our firmware builds in qemu.git
(SeaBIOS and EDK2) will be happy with the 64-bit EP. I suspect they should
be fine by now, but I've CC'd Gerd to confirm.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]