Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Andrew Jones <andrew.jones@linux.dev>
To: Colton Lewis <coltonlewis@google.com>
Cc: alexandru.elisei@arm.com, kvm@vger.kernel.org,
	kvmarm@lists.cs.columbia.edu, maz@kernel.org,
	eric.auger@redhat.com, oliver.upton@linux.dev, reijiw@google.com,
	ricarkol@google.com
Subject: Re: [kvm-unit-tests PATCH] arm: Remove MAX_SMP probe loop
Date: Fri, 6 Jan 2023 08:11:24 +0100	[thread overview]
Message-ID: <20230106071124.ytv6cmkvmvxhzmoh@orel> (raw)
In-Reply-To: <gsntzgawr321.fsf@coltonlewis-kvm.c.googlers.com>

On Thu, Jan 05, 2023 at 11:09:58PM +0000, Colton Lewis wrote:
> Andrew Jones <andrew.jones@linux.dev> writes:
> > On Tue, Dec 20, 2022 at 04:32:00PM +0000, Colton Lewis wrote:
> > > Alexandru Elisei <alexandru.elisei@arm.com> writes:
> > Ah, I think I understand now. Were you running 32-bit arm tests? If so,
> > it'd be good to point that out explicitly in the commit message (the
> > 'arm:' prefix in the summary is ambiguous).
> 
> No, this was happening on arm64. Since it had been a while since I noted
> this issue, I reviewed it and realized the issue was only happening
> using -accel tcg. That was automatically being used on my problem test
> machine without me noticing. That's where the limit of 8 seems to be
> coming from and why the loop is triggered.
> 
> qemu-system-aarch64: Number of SMP CPUs requested (152) exceeds max CPUs
> supported by machine 'mach-virt' (8)
> 
> Since this case doesn't directly involve KVM, I doubt anyone cares about
> a fix.
> 
> > Assuming the loop body was running because it needed to reduce MAX_SMP to
> > 8 or lower for 32-bit arm tests, then we should be replacing the loop with
> > something that caps MAX_SMP at 8 for 32-bit arm tests instead.
> 
> We could cap at 8 for ACCEL=tcg. Even if no one cares, I'm tempted to do
> it so no one hits the same little landmine as me in the future.

TCG supports up to 255 CPUs. The only reason it'd have a max of 8 is if
you were configuring a GICv2 instead of a GICv3. Using gic-version=3 or
gic-version=max should allow the 152 CPUs to work. Actually, I should
have asked about your gic version instead of whether or not the VM was
AArch32 in the first place. I was incorrectly associating the gicv2
limits with arm32 since my memories of these things have started to
blur together...

Thanks,
drew

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 18:52 [kvm-unit-tests PATCH] arm: Remove MAX_SMP probe loop Colton Lewis
2022-12-20 10:41 ` Alexandru Elisei
2022-12-20 16:32   ` Colton Lewis
2022-12-26 18:21     ` Andrew Jones
2023-01-05 23:09       ` Colton Lewis
2023-01-06  7:11         ` Andrew Jones [this message]
2023-01-06 17:37           ` Colton Lewis
2023-01-09  8:59             ` Andrew Jones
2023-01-09 21:43               ` Colton Lewis
2022-12-26 18:12 ` Andrew Jones

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=20230106071124.ytv6cmkvmvxhzmoh@orel \
    --to=andrew.jones@linux.dev \
    --cc=alexandru.elisei@arm.com \
    --cc=coltonlewis@google.com \
    --cc=eric.auger@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=reijiw@google.com \
    --cc=ricarkol@google.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