From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C060EC433EF for ; Sun, 3 Oct 2021 07:55:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83AA161B31 for ; Sun, 3 Oct 2021 07:55:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 83AA161B31 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:52118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWwLe-0006hl-NN for qemu-devel@archiver.kernel.org; Sun, 03 Oct 2021 03:55:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWw9K-0003Y3-0w for qemu-devel@nongnu.org; Sun, 03 Oct 2021 03:43:06 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:37828) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWw9F-0000q2-F9 for qemu-devel@nongnu.org; Sun, 03 Oct 2021 03:43:05 -0400 Received: by mail-ed1-x52f.google.com with SMTP id ba1so51823195edb.4 for ; Sun, 03 Oct 2021 00:43:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O+L6LDgBylGhLfbTqHLm7sHl8WXqmG3KPJ3RVD1qdSM=; b=mmxw78likKF7v+hVArH1QvCe9J5jAhv+QNx37o99VOViWa1sPV1lCrjE+iCrJobMr4 CAwod9tOoNdS1ap1+I32zIo6UajbzkF7DHLZ6hmz0RbA7qko7SH82dYXkun4U4S1Z17V gtoDjb6Idj5OQB72q3tkbZqGmW7WWpWkZ5XVypN03Kdj4L/K7OMKxzrtp8C0BmC3E6CX PQ8MaRfgwEz2YgZvUMOGnTppX+HG54FvvUzgJP4MyLOJiqc2s3eF813VoNQY9yIH9bsg H7eZpubd9A5Sa7Vc3bbryulV8ZPqrN8kZbRQyrychwjZjORIn7KrFu9P0tCP5oaP+o1q rVQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=O+L6LDgBylGhLfbTqHLm7sHl8WXqmG3KPJ3RVD1qdSM=; b=l5laIzknAy65Dht25LPqblC5ucxYe4z//FMeCG9xA8CbJ4lFs3oDWCMo+PyG2uOV7p ZDfHt55VGpUqTlG1JNl3iIoZa/dGc9CVg5WRaj1PtK5O5gwdxEmHlWEAxhjy4jZo0+em Tr4vVWdv3HsJIZxZh7HUn4u05Cc0aYPP6Mp/siLYGRHaTXPocNYDDe9XP7LAnELOS7ic 1/jvUHLUUCNZAsPnSlq4AFo0pgIhs6U5e+jvXyr6kUPGW2JtrC6hQMqOnUL2IOCbdfvD o4ABqZcPa0u7PUwLYj4xNhkO7387aShIwq+XpTmfiwOcnwUm9kHSPQkusGaYqilKB2nw Guzg== X-Gm-Message-State: AOAM532prV5ip6ISpcUakTI+XTzOuE/8qeg+S491C0b+kUwOQwbYLRiI PLlwo1UP9FkacynYqtzIsrQeqTmitPo= X-Google-Smtp-Source: ABdhPJyi6Wv4OahNULtjDT4EQPVRvxVD72i5F2QNLVZEF6lyc6yMTmf7VCRG5ThU8G0QtsVJb7kdiA== X-Received: by 2002:a17:907:984d:: with SMTP id jj13mr9368561ejc.211.1633246980159; Sun, 03 Oct 2021 00:43:00 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n6sm5560856eds.10.2021.10.03.00.42.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 00:42:59 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 10/30] machine: Use ms instead of global current_machine in sanity-check Date: Sun, 3 Oct 2021 09:42:30 +0200 Message-Id: <20211003074250.60869-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211003074250.60869-1-pbonzini@redhat.com> References: <20211003074250.60869-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52f.google.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jones , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Cornelia Huck , Pankaj Gupta , Yanan Wang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Yanan Wang 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 Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210929025816.21076-11-wangyanan55@huawei.com> Signed-off-by: Paolo Bonzini --- 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 f2a34d98c0..12d7416053 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.31.1