From nobody Sat Nov 23 22:32:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1731250335; cv=none; d=zohomail.com; s=zohoarc; b=jxM2u4IbxUAbaLOQZ8/vpbxmIgVTYRP8waJj8G5Z/LytDRFVAKBJz0WMDmKDIA4VwnWseWgSVm8Zu02tiewz5adIydz9UU1IEQI22YV+hIpBSsRB99EXi6TX8/KKxE4xHFBRK7msa629dL3K12KyhGcZq6pNcDYQ2TSHEFtYCiE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731250335; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ybe8B4eiarVb0yHwOqLcESab4y6BpUOjLNu9lWf+Cp0=; b=KQwN5Ki6euWk7qcuFFcJX3ebocIrylpsd5VnrVofmMX2ZIcrpsyDl1JCyxAbP+SQ2DX2CNpSfj1h2m8UzJa1NSiu7Ek/93n0tfp0vF2ScHNk4SV9SSK2Wkz5gXchKS4FIq0r1GEQO4KJm+cyRMfj+4Ctcyg4uJ/TySO6C9gU6ak= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1731250335047429.6001628285637; Sun, 10 Nov 2024 06:52:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tA9Hc-0002MK-3P; Sun, 10 Nov 2024 09:51:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tA9HZ-0002LV-Lk for qemu-devel@nongnu.org; Sun, 10 Nov 2024 09:51:17 -0500 Received: from mgamail.intel.com ([192.198.163.7]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tA9HX-0007wA-TE for qemu-devel@nongnu.org; Sun, 10 Nov 2024 09:51:17 -0500 Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2024 06:51:14 -0800 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by orviesa010.jf.intel.com with ESMTP; 10 Nov 2024 06:51:13 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1731250276; x=1762786276; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=d9l7L0xCB5UR2k2nHxVrAPYNnYlVC0ryQ8tN0nsNAlI=; b=ldodhYj+pry7jVKGTaohLKsD2ILSy7yfkrzJ5iHDnXye/4F2T+HhR/R6 qsNv0xmrQIe72tjrtTAijP9CjxwWxL7cxNX9mEZaAF2F3O1jbUbOWUzGh ttbncWPnIm1hVWAg930GDxDGmJ80UAuZ6H7YtcdQ9TImcLoWlVI9OpdNj nkIKXvDRmlC8IiKsh9q8XJep0jMIcFLTEKcobIVw/kRrFNyftBEsLmx04 xYA1j9Z+VyJXqvUE8Z2A/3U0Lsnkg4xf7/XnWNRirmYR6eLZCADAcNh3k mBrcxHMc2T3m54KBsv8QI6kvrMp1+UqcfzS5oKdgEf4TdTAzXK+pRHMqk w==; X-CSE-ConnectionGUID: Evmr1fKATtCGmkoqp2lzMA== X-CSE-MsgGUID: qZeFHCT1SDaxXaCZDFyEfw== X-IronPort-AV: E=McAfee;i="6700,10204,11252"; a="56467600" X-IronPort-AV: E=Sophos;i="6.12,143,1728975600"; d="scan'208";a="56467600" X-CSE-ConnectionGUID: lcG8gB3JTSuYwjtV9QX7tA== X-CSE-MsgGUID: cGCVGWdDTfyyWCd0/8lXKQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,143,1728975600"; d="scan'208";a="86467591" From: Zhao Liu To: Eduardo Habkost , Marcel Apfelbaum , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yanan Wang , Peter Maydell Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH for 9.2 2/2] hw/core/machine-smp: Fix error message parameter Date: Sun, 10 Nov 2024 23:09:01 +0800 Message-Id: <20241110150901.130647-3-zhao1.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241110150901.130647-1-zhao1.liu@intel.com> References: <20241110150901.130647-1-zhao1.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=192.198.163.7; envelope-from=zhao1.liu@intel.com; helo=mgamail.intel.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.118, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1731250335376116600 Content-Type: text/plain; charset="utf-8" In the loop checking smp cache support, the error message should report the current cache level and type. Fix the parameter of error_setg() to ensure it reports the correct cache level and type. Resolves: Coverity CID 1565391 Fixes: f35c0221fef8 ("hw/core: Check smp cache topology support for machine= ") Reported-by: Peter Maydell Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/core/machine-smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/machine-smp.c b/hw/core/machine-smp.c index b87637c78f6f..b954eb849027 100644 --- a/hw/core/machine-smp.c +++ b/hw/core/machine-smp.c @@ -317,7 +317,7 @@ bool machine_parse_smp_cache(MachineState *ms, !mc->smp_props.cache_supported[props->cache]) { error_setg(errp, "%s cache topology not supported by this machine", - CacheLevelAndType_str(node->value->cache)); + CacheLevelAndType_str(props->cache)); return false; } =20 --=20 2.34.1