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: Philippe Mathieu-Daudé
Subject: Re: [PATCH v5 3/3] pc: q35: Bump max_cpus to 1024
Date: Wed, 7 Jun 2023 10:26:59 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2

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

Also, keep max_cpus at 288 for machine version 8.0 and older.

Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Julia Suvorova <jusual@redhat.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
---
  hw/i386/pc_q35.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)




reply via email to

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