Message ID | 1415376280-14130-4-git-send-email-drjones@redhat.com |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDY2J6HAR4PBBWO46ORAKGQEGANMYCA@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 06E41218C0 for <linaro@patches.linaro.org>; Fri, 7 Nov 2014 16:07:55 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id mc6sf3182407lab.7 for <linaro@patches.linaro.org>; Fri, 07 Nov 2014 08:07:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=Gl9upMITXdybSqyi1KJNw+g+HhovQ/z0WwHaV1vV6+A=; b=foQuy4AKF6+qfRlSbxwDd20kUkEFgDoFy5oPyzxBiwCF5AwOa0AbXm1Zc+ZPvKBCUg jG7C+PPaS1lEwYRA7tmdnOySNOWRjm1WDT//j9wXNB1dHyB9j3eOOD+jQUJ2f2SyA1h+ Agx3BCjJPcpvkhBPBREGVgjfVpBxPc86S4TSHGeT73vNuMS4cPZhhkJtK+t6ZOesOj+i t3Efx3NdTLPoH8y8QMtgb+aJ7KlerGt5n8O3gD6IUSW93kGV/J0wd1SFMzo7lfB5NY9e P79mVDA3g3FBKwaXhcvgJ7iLQTT7+eVrfU4nIo0hUd+QKQftiD5AkcWG6s2GZzXfoz2F D+gw== X-Gm-Message-State: ALoCoQkjitXA+1FJLMyM5oq/5qpyR0qCpYM+vLkPxF6Ukd4iWL3BNRV8ToHos8h/37ZAmZP+jzea X-Received: by 10.152.246.40 with SMTP id xt8mr385712lac.0.1415376473988; Fri, 07 Nov 2014 08:07:53 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.121.72 with SMTP id li8ls244923lab.101.gmail; Fri, 07 Nov 2014 08:07:53 -0800 (PST) X-Received: by 10.112.200.34 with SMTP id jp2mr12153241lbc.1.1415376473588; Fri, 07 Nov 2014 08:07:53 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id d4si15458193lbb.116.2014.11.07.08.07.53 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Nov 2014 08:07:53 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id gd6so4566611lab.20 for <patchwork-forward@linaro.org>; Fri, 07 Nov 2014 08:07:53 -0800 (PST) X-Received: by 10.152.42.226 with SMTP id r2mr12075838lal.29.1415376473495; Fri, 07 Nov 2014 08:07:53 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp224484lbc; Fri, 7 Nov 2014 08:07:53 -0800 (PST) X-Received: by 10.180.75.179 with SMTP id d19mr6457032wiw.21.1415376472783; Fri, 07 Nov 2014 08:07:52 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id bq18si3726207wib.25.2014.11.07.08.07.52 for <patch@linaro.org> (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 07 Nov 2014 08:07:52 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:60856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1Xmm4k-0001w7-Ep for patch@linaro.org; Fri, 07 Nov 2014 11:07:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <drjones@redhat.com>) id 1Xmm1x-0007A2-2F for qemu-devel@nongnu.org; Fri, 07 Nov 2014 11:05:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <drjones@redhat.com>) id 1Xmm1q-0003aU-Sa for qemu-devel@nongnu.org; Fri, 07 Nov 2014 11:04:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37227) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <drjones@redhat.com>) id 1Xmm1q-0003aG-Lo for qemu-devel@nongnu.org; Fri, 07 Nov 2014 11:04:50 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA7G4oJi021665 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for <qemu-devel@nongnu.org>; Fri, 7 Nov 2014 11:04:50 -0500 Received: from hawk.usersys.redhat.com (dhcp-1-153.brq.redhat.com [10.34.1.153]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sA7G4iwC027938; Fri, 7 Nov 2014 11:04:49 -0500 From: Andrew Jones <drjones@redhat.com> To: qemu-devel@nongnu.org Date: Fri, 7 Nov 2014 17:04:40 +0100 Message-Id: <1415376280-14130-4-git-send-email-drjones@redhat.com> In-Reply-To: <1415376280-14130-1-git-send-email-drjones@redhat.com> References: <1415376280-14130-1-git-send-email-drjones@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com, ehabkost@redhat.com Subject: [Qemu-devel] [PATCH 3/3] vl: warn on topology <-> maxcpus mismatch X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: drjones@redhat.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 |
diff --git a/vl.c b/vl.c index c62fe29aa8075..72ffbffd858c5 100644 --- a/vl.c +++ b/vl.c @@ -1313,6 +1313,13 @@ static void smp_parse(QemuOpts *opts) } max_cpus = qemu_opt_get_number(opts, "maxcpus", 0); + max_cpus = max_cpus ?: cpus; + + if (sockets * cores * threads != max_cpus) { + fprintf(stderr, "cpu topology: warning: " + "sockets (%u) * cores (%u) * threads (%u) != max_cpus (%u)\n", + sockets, cores, threads, max_cpus); + } smp_cpus = cpus; smp_cores = cores;
Start guiding users towards making sure their topology supports the maximum number of cpus they wish to support. A future patch series will enforce this for new machine types. Signed-off-by: Andrew Jones <drjones@redhat.com> --- vl.c | 7 +++++++ 1 file changed, 7 insertions(+)