Received: by 2002:ac2:5978:0:0:0:0:0 with SMTP id h24csp4493124lfp; Mon, 27 Sep 2021 21:07:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqyqkG1Id1wXtLhElDCoaoy/2zfgfnLfYjHiaePd6J4b8qyvGtRvV0A/W1PbgVlCc1yxzM X-Received: by 2002:a02:3b50:: with SMTP id i16mr2700399jaf.57.1632802020285; Mon, 27 Sep 2021 21:07:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632802020; cv=none; d=google.com; s=arc-20160816; b=BN5IaAS6aF0G8JCeBBEKu5bQsILNb5NZKHw7jZSjTGFD0WoIh0+kp+mJLwFG0qnDkW qqDloo8+hjEldqvAlMyXYTqbZe4vX7s1eNrqmdLnePCpKS2RYOl4dyqxySFglulszDUZ Dgf5mXs/yEC7oe9wm/l/kfsHfZFl7/Fnd+pDqCJrI/8hXlP+jLNlxLxJ/xOJWJimcrRM 3wdVCveK1KmcSDO7fsH7wtXLt2hopPf0Y4bPi1uIDLRayRZ3mbEo4gf74M5yGtYlxX9y YgxsL6faJLdP8rU0I5qRRomVhWjQ+asis6NxOJ2WkvyueRDJux1jd4usEDDKp+p1x9D3 GO7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:references :in-reply-to:message-id:date:subject:to:from; bh=U5sy2zOq1/+qfafzmb4raFMTgh24+6h0uEJhxyCCkSI=; b=tT5Llm6yJQJiynnyXGXurSzPEiCjA55IW/1n+AZx36WGX5qVlabyYfTLbjxV/Q0cr4 84cnmQbdXo+RJ23Vr7kwxznltFxjfjdf/glZGmlVohBkpTYRuXN0+va2pxPyS5sAil0q Ay89dl7aztHlBTXXPTzUk41/CsDwEF7W2F/o95qvGo1Jm/d3rHUHxA4kh6A3R/ePaagN 3rJTEydqFX2tfoEL2o7aGSBt5TBZrKcYhmScksivOigKSO2YnWN+ePRgJHV8TIpM9w42 RvqivJIFOthnAL3MJSb9ln/szWT6RAYRdt9DaOgTr4kYX8A/O3E56txQgDJdAUnqnlLr 9p2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q5si15033997ioq.60.2021.09.27.21.07.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Sep 2021 21:07:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: from localhost ([::1]:50098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mV4OR-0005gp-JC for alex.bennee@linaro.org; Tue, 28 Sep 2021 00:06:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mV4G3-0001WP-9P; Mon, 27 Sep 2021 23:58:19 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mV4Fw-0002Ir-Ql; Mon, 27 Sep 2021 23:58:19 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4HJQbH22XGz8ykn; Tue, 28 Sep 2021 11:53:31 +0800 (CST) Received: from dggpemm500023.china.huawei.com (7.185.36.83) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Tue, 28 Sep 2021 11:58:08 +0800 Received: from DESKTOP-TMVL5KK.china.huawei.com (10.174.187.128) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Tue, 28 Sep 2021 11:58:07 +0800 From: Yanan Wang To: Eduardo Habkost , Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Andrew Jones Subject: [PATCH v11 09/14] machine: Use ms instead of global current_machine in sanity-check Date: Tue, 28 Sep 2021 11:57:50 +0800 Message-ID: <20210928035755.11684-10-wangyanan55@huawei.com> X-Mailer: git-send-email 2.8.4.windows.1 In-Reply-To: <20210928035755.11684-1-wangyanan55@huawei.com> References: <20210928035755.11684-1-wangyanan55@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.187.128] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500023.china.huawei.com (7.185.36.83) X-CFilter-Loop: Reflected Received-SPF: pass client-ip=45.249.212.188; envelope-from=wangyanan55@huawei.com; helo=szxga02-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Pierre Morel , Pankaj Gupta , Cornelia Huck , qemu-devel@nongnu.org, Yanan Wang , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, "Michael S . Tsirkin" , wanghaibin.wang@huawei.com, qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: vna97Q0Coh0D In the sanity-check of smp_cpus and max_cpus against mc in function machine_set_smp(), we are now using ms->smp.max_cpus for the check but using current_machine->smp.max_cpus in the error message. Tweak this by uniformly using the local ms. Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones Reviewed-by: Pankaj Gupta Reviewed-by: Cornelia Huck --- hw/core/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index 0df597f99c..1ad5dac3e8 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -881,7 +881,7 @@ static void machine_set_smp(Object *obj, Visitor *v, const char *name, } else if (ms->smp.max_cpus > mc->max_cpus) { error_setg(errp, "Invalid SMP CPUs %d. The max CPUs " "supported by machine '%s' is %d", - current_machine->smp.max_cpus, + ms->smp.max_cpus, mc->name, mc->max_cpus); } -- 2.19.1