qemu-arm.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: Shannon Zhao <shannon.zhao@linaro.org>
Cc: peter.maydell@linaro.org, mst@redhat.com, qemu-devel@nongnu.org,
	qemu-arm@nongnu.org, zhaoshenglong@huawei.com,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH] arm: virt-acpi: each MADT.GICC entry as enabled unconditionally
Date: Wed, 3 Feb 2016 15:50:19 +0100	[thread overview]
Message-ID: <20160203145019.GE4273@hawk.localdomain> (raw)
In-Reply-To: <20160129160731.GH4340@hawk.localdomain>

On Fri, Jan 29, 2016 at 05:07:31PM +0100, Andrew Jones wrote:
> On Fri, Jan 29, 2016 at 11:44:24PM +0800, Shannon Zhao wrote:
> > >>>And below check in virt.c is not right while it should compare the global
> > >>>max_cpus with the max_cpus GIC supports.
> > >>>
> > >>>     if (smp_cpus > max_cpus) {
> > >>>         error_report("Number of SMP CPUs requested (%d) exceeds max CPUs "
> > >>>                      "supported by machine 'mach-virt' (%d)",
> > >>>                      smp_cpus, max_cpus);
> > >>>         exit(1);
> > >>>     }
> > >max_cpus is getting set to the number the gic supports just above this
> > >check. So max_cpus == gic_supported_cpus already, and this check is just
> > >confirming the number of cpus the user has selected is OK.
> > No, the global max_cpus (which is defined in vl.c and exported in
> > sysemu/sysemu.h) is not the local variable max_cpus.
> 
> I now see what you mean though. If we don't want something like
> -smp 1,maxcpus=9 to erroneously succeed on a gicv2 machine, then we
> should be checking the global max_cpus here. I agree it should be
> fixed, because, even though it changes nothing atm, we don't want to
> allow invalid command lines.
> 
> Will you send the patch?

I'll send one in a second.

drew

  reply	other threads:[~2016-02-03 14:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 14:24 [Qemu-arm] [PATCH] arm: virt-acpi: each MADT.GICC entry as enabled unconditionally Igor Mammedov
2016-01-29 14:59 ` [Qemu-arm] [Qemu-devel] " Shannon Zhao
2016-01-29 15:26   ` Andrew Jones
2016-01-29 15:44     ` Shannon Zhao
2016-01-29 16:07       ` Andrew Jones
2016-02-03 14:50         ` Andrew Jones [this message]
2016-01-29 16:35   ` Igor Mammedov
2016-01-30  1:50 ` Shannon Zhao
2016-02-01 10:43   ` [Qemu-arm] " Igor Mammedov

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=20160203145019.GE4273@hawk.localdomain \
    --to=drjones@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhao@linaro.org \
    --cc=zhaoshenglong@huawei.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).