qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v5 3/3] pc: q35: Bump max_cpus to 1024


From: Daniel P . Berrangé
Subject: Re: [PATCH v5 3/3] pc: q35: Bump max_cpus to 1024
Date: Wed, 7 Jun 2023 09:33:02 +0100
User-agent: Mutt/2.2.9 (2022-11-12)

On Wed, Jun 07, 2023 at 10:26:59AM +0200, Philippe Mathieu-Daudé wrote:
> On 7/6/23 04:49, 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
> 
> Odd, we already check the upper limit with KVM_CAP_NR_VCPUS.
> See in kvm_init():
> 
>     /* check the vcpu limits */
>     soft_vcpus_limit = kvm_recommended_vcpus(s);
>     hard_vcpus_limit = kvm_max_vcpus(s);
> 
> When testing your series I get:
> 
> qemu-system-x86_64: -accel kvm: warning: Number of SMP cpus requested (1024)
> exceeds the recommended cpus supported by KVM (710)
> 
> $ uname -srvp
> Linux 5.15.0-71-generic #78-Ubuntu SMP Tue Apr 18 09:00:29 UTC 2023 x86_64

That's a relatively old kernel. With latest kernels, the 'recommended cpus'
limit reported will match the number of CPUs in your host, so for me it
always complains for smp > 12.



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]