qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Joao Martins <joao.m.martins@oracle.com>
To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, richard.henderson@linaro.org,
	eduardo@habkost.net, mst@redhat.com, marcel.apfelbaum@gmail.com,
	imammedo@redhat.com, berrange@redhat.com, jusual@redhat.com,
	jon.grimm@amd.com, santosh.Shukla@amd.com
Subject: Re: [PATCH v2] pc: q35: Bump max_cpus to 1024
Date: Thu, 1 Jun 2023 11:09:45 +0100	[thread overview]
Message-ID: <39a49814-28d8-ffc8-42b4-3af14bb9dd47@oracle.com> (raw)
In-Reply-To: <20230531225127.331998-1-suravee.suthikulpanit@amd.com>



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()?)

> Thank you,
> Suravee
> 
>  hw/i386/pc_q35.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index f02919d92c..e7dc226bd5 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -370,7 +370,7 @@ static void pc_q35_machine_options(MachineClass *m)
>      machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE);
>      machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
>      machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE);
> -    m->max_cpus = 288;
> +    m->max_cpus = 1024;
>  }
>  
>  static void pc_q35_8_1_machine_options(MachineClass *m)


  reply	other threads:[~2023-06-01 10:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-31 22:51 [PATCH v2] pc: q35: Bump max_cpus to 1024 Suravee Suthikulpanit
2023-06-01 10:09 ` Joao Martins [this message]
2023-06-01 10:17   ` Daniel P. Berrangé
2023-06-01 11:03     ` Gerd Hoffmann
2023-06-01 11:09     ` Michael S. Tsirkin
2023-06-01 21:54       ` Suthikulpanit, Suravee
2023-06-02  8:43         ` Daniel P. Berrangé
  -- strict thread matches above, loose matches on Subject: below --
2022-11-18  8:55 Dario Faggioli
2022-11-18  9:18 ` Daniel P. Berrangé
2022-11-18  9:43 ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39a49814-28d8-ffc8-42b4-3af14bb9dd47@oracle.com \
    --to=joao.m.martins@oracle.com \
    --cc=berrange@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=imammedo@redhat.com \
    --cc=jon.grimm@amd.com \
    --cc=jusual@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=santosh.Shukla@amd.com \
    --cc=suravee.suthikulpanit@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).