From nobody Wed May 15 06:10:40 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=linux.intel.com ARC-Seal: i=1; a=rsa-sha256; t=1711535279; cv=none; d=zohomail.com; s=zohoarc; b=UROBnYiGADI9PGJrBH7iYPPQ+U3lTIx23iTtzVCHZunvil8ZmFGzhvTk3NmI3hmLC5wOMZ++PkRHjdV7lPXiQVlwEFmQuD9PnPqzEpt3z60W6n9RHCLkrbwOf03oUbEIenMKk1kt2R+lVkrBdyA2eGlrKSNa8cnbHaUatkZstcM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1711535279; 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=rZGtR1DR2/bd93/AIYzyYOaeIZ/M640wgBt0HAIHa8g=; b=BNKgK/CgkLu4yykmGIkq7TXymtyWn4UWBhtJeYnkVnkvKu2lxhwU9gBYVuBI9r5Rgi5dAvUls0+4ZC1MRESqWfPKM2MZvAAO0pM5S+PmmTIicx36XPPC8QP5hgN+dy3MsC78PQcBBLRzlwfjmGTkr7pv1CzbTYroanWxhmPfagE= 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 1711535279143983.947102100212; Wed, 27 Mar 2024 03:27:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpQUz-0007n9-4G; Wed, 27 Mar 2024 06:27:15 -0400 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 1rpQUC-0007NB-3Z for qemu-devel@nongnu.org; Wed, 27 Mar 2024 06:26:24 -0400 Received: from mgamail.intel.com ([192.198.163.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpQU4-0007aA-JB for qemu-devel@nongnu.org; Wed, 27 Mar 2024 06:26:23 -0400 Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 03:25:59 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa008.fm.intel.com with ESMTP; 27 Mar 2024 03:25:58 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711535176; x=1743071176; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ykBXsEkK2ADVVDuf1AFicY9uXXOp9HytuDaW5JJ5N2Q=; b=BEOFsGLsrTQcTZO8K2PWqSRNpHVx+kU+62QoX/5yiPCKMCcNBaGNMLYS CvJ68bFtRWGlKPgCvx+9ldo9c6jzPkdZp7TXTujsQCSVQQ60w+DiXGgEk 4dksTlj1cNADg0LnuC9FYUJ/AbvK/9WAlW/LqiFYKcNXNr/kwFHYzgjHZ 8mCDgaqhak6jrTckJZsZqWHPU0mfYzfdZX0C8MXosBSThbnImzACxapPD 62im6Yz+GSrzKnWCjWmo6SzL8lcj00MWs1I2y+xDRQ/d6l3KYKUUTS8M/ BJ8KDoln1wQ5R8rtuQR/ZC3fcx6XFLEZ1pQUTTViPZT98ku+8tvOtNZH5 w==; X-CSE-ConnectionGUID: +hclnJ5NSY6Gx2CQWYwTNg== X-CSE-MsgGUID: iAOsyJ2pSeOibG/2V9oSrA== X-IronPort-AV: E=McAfee;i="6600,9927,11025"; a="6489754" X-IronPort-AV: E=Sophos;i="6.07,158,1708416000"; d="scan'208";a="6489754" X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,158,1708416000"; d="scan'208";a="16354469" From: Zhao Liu To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 1/3] target/i386/host-cpu: Consolidate the use of warn_report_once() Date: Wed, 27 Mar 2024 18:39:49 +0800 Message-Id: <20240327103951.3853425-2-zhao1.liu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327103951.3853425-1-zhao1.liu@linux.intel.com> References: <20240327103951.3853425-1-zhao1.liu@linux.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: none client-ip=192.198.163.19; envelope-from=zhao1.liu@linux.intel.com; helo=mgamail.intel.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.088, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: 1711535279663100003 Content-Type: text/plain; charset="utf-8" From: Zhao Liu Use warn_report_once() to get rid of the static local variable "warned". Signed-off-by: Zhao Liu --- target/i386/host-cpu.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/target/i386/host-cpu.c b/target/i386/host-cpu.c index 92ecb7254b83..280e427c017c 100644 --- a/target/i386/host-cpu.c +++ b/target/i386/host-cpu.c @@ -55,18 +55,15 @@ static uint32_t host_cpu_adjust_phys_bits(X86CPU *cpu) { uint32_t host_phys_bits =3D host_cpu_phys_bits(); uint32_t phys_bits =3D cpu->phys_bits; - static bool warned; =20 /* * Print a warning if the user set it to a value that's not the * host value. */ - if (phys_bits !=3D host_phys_bits && phys_bits !=3D 0 && - !warned) { - warn_report("Host physical bits (%u)" - " does not match phys-bits property (%u)", - host_phys_bits, phys_bits); - warned =3D true; + if (phys_bits !=3D host_phys_bits && phys_bits !=3D 0) { + warn_report_once("Host physical bits (%u)" + " does not match phys-bits property (%u)", + host_phys_bits, phys_bits); } =20 if (cpu->host_phys_bits) { --=20 2.34.1 From nobody Wed May 15 06:10:40 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=linux.intel.com ARC-Seal: i=1; a=rsa-sha256; t=1711535287; cv=none; d=zohomail.com; s=zohoarc; b=AEhFujtWvDijJpVJGClprM5isphBOwzQ2n35boi6LhJdApv5TwmNqOdRwB7/2Nz5xDW+wrPwIbHEKx+KumwlFtQdKNwGwqQP72hNHJRMijwrPiPKo4m6r9sxzUO4n5MFZmEzKS+UE3BeYRZRd+BtYaRv8GUWr2nD/AGHS76lGlM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1711535287; 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=5vVRfS1DoFbPpYkCTmuhBDmwX3XuWeLI6O2swrmE2rg=; b=TWyx2xK2Ky7oveX3ODu3S9ecGq9/8/OETYZVv/WijPy7dgbr+z2nhvqpeYsKTFyHhNWO8QclFbZtPaF3kUc2G0TW56dvq9mpbkt8l/Jq2dPN5GClGN76IkN3U+Mor7XYBs/0d42qlwJRBIDHXLWh33gs5iGwz77HhadIuIJUQSI= 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 1711535287351266.39513126204497; Wed, 27 Mar 2024 03:28:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpQVG-0008H6-0S; Wed, 27 Mar 2024 06:27:30 -0400 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 1rpQUC-0007NH-Fw for qemu-devel@nongnu.org; Wed, 27 Mar 2024 06:26:24 -0400 Received: from mgamail.intel.com ([192.198.163.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpQU4-0007aP-J9 for qemu-devel@nongnu.org; Wed, 27 Mar 2024 06:26:23 -0400 Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 03:26:00 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa008.fm.intel.com with ESMTP; 27 Mar 2024 03:25:59 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711535176; x=1743071176; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NN7bJ9kcE9ymRjA80j4SFQrPkSHGU1tCOZouHjnJcSA=; b=EvoE/PCEAXhJGBZL0VFp4K6GHzLBNi0fZmyNMDcG4XAwFfQc88RwIr/B shFNLebGtlnuHfYPSzpi6tiDmpGyGdEuFmykmL2+rVUiHEevw7u6nkPll rpDpK4pqcHzHC8uSt25ehTcA0LvlDOQsEJyuvG1Mb7sFcVo6qhNbG2Qrs n+NEhW4IAnlN0ChUbFmJyoc/j0T+vJ1LGQJ+fudad30rasnOiejD+QKb1 Xg2VKkF827+mQ6pMoBTJig2oOh5QRFgttD9sqyOKNH3a3SKtFwQ0dyCDi gMkPdm+CFDyqFv7dnZvDWpzCudDNkAKvbwjIErJevZNN3OxNFIx14tMPX w==; X-CSE-ConnectionGUID: 5zLAERswTACTsWLPcoRbTA== X-CSE-MsgGUID: ucRV/GsCT8adfBTFBnTxxQ== X-IronPort-AV: E=McAfee;i="6600,9927,11025"; a="6489758" X-IronPort-AV: E=Sophos;i="6.07,158,1708416000"; d="scan'208";a="6489758" X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,158,1708416000"; d="scan'208";a="16354475" From: Zhao Liu To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 2/3] target/i386/cpu: Consolidate the use of warn_report_once() Date: Wed, 27 Mar 2024 18:39:50 +0800 Message-Id: <20240327103951.3853425-3-zhao1.liu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327103951.3853425-1-zhao1.liu@linux.intel.com> References: <20240327103951.3853425-1-zhao1.liu@linux.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: none client-ip=192.198.163.19; envelope-from=zhao1.liu@linux.intel.com; helo=mgamail.intel.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.088, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: 1711535287680100001 Content-Type: text/plain; charset="utf-8" From: Zhao Liu The difference between error_printf() and error_report() is the latter may contain more information, such as the name of the program ("qemu-system-x86_64"). Thus its variant error_report_once() and warn_report()'s variant warn_report_once() can be used here to print the information only once without a static local variable "ht_warned". Signed-off-by: Zhao Liu --- target/i386/cpu.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 33760a2ee163..0487469d75f3 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7230,7 +7230,6 @@ static void x86_cpu_realizefn(DeviceState *dev, Error= **errp) X86CPUClass *xcc =3D X86_CPU_GET_CLASS(dev); CPUX86State *env =3D &cpu->env; Error *local_err =3D NULL; - static bool ht_warned; unsigned requested_lbr_fmt; =20 #if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) @@ -7453,13 +7452,11 @@ static void x86_cpu_realizefn(DeviceState *dev, Err= or **errp) */ if (IS_AMD_CPU(env) && !(env->features[FEAT_8000_0001_ECX] & CPUID_EXT3_TOPOEXT) && - cs->nr_threads > 1 && !ht_warned) { - warn_report("This family of AMD CPU doesn't support " - "hyperthreading(%d)", - cs->nr_threads); - error_printf("Please configure -smp options properly" - " or try enabling topoext feature.\n"); - ht_warned =3D true; + cs->nr_threads > 1) { + warn_report_once("This family of AMD CPU doesn't support " + "hyperthreading(%d).", cs->nr_threads); + error_report_once("Please configure -smp options properly" + " or try enabling topoext feature."); } =20 #ifndef CONFIG_USER_ONLY --=20 2.34.1 From nobody Wed May 15 06:10:40 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=linux.intel.com ARC-Seal: i=1; a=rsa-sha256; t=1711535236; cv=none; d=zohomail.com; s=zohoarc; b=RONQuPQ1NmGDf/0kKZ+4NhqopwygsGB0bAyNenwtw7ePKC+zrLT8GsDif7bD2H0EZbyKX6BOnnrHwb/Y73qLt0vt+4IkA/mNi4HAcGnWj015HxDxvqRuBVzuUcdrOFQSlpMCV9bkf6LptjKwRUWunlSiYdYG2oKRcNbD1lLIHTM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1711535236; 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=JXvNL1WAKeuewrgxZapXNzphR3fQS22m/tuMYCjLisc=; b=fQ9JN0ZzDlkrNyRAPAaHKLYnxLHKoN3YZ9cJyjj3VEvUuRece4FGmdGy6ljNYARPgazbwimXs50tKPHO9SxXJUKNEbKngALfzSILshVvh4XxSw7Gq3H7ETZW9ujlzZ5wYRfeuOiAOVBBFrcCPRfthuJF4P/1nqzUeocS3dtKNNg= 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 1711535236171545.4550463374553; Wed, 27 Mar 2024 03:27:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpQUu-0007lk-SW; Wed, 27 Mar 2024 06:27:08 -0400 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 1rpQUF-0007OO-8v for qemu-devel@nongnu.org; Wed, 27 Mar 2024 06:26:27 -0400 Received: from mgamail.intel.com ([192.198.163.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpQUC-0007aA-SO for qemu-devel@nongnu.org; Wed, 27 Mar 2024 06:26:26 -0400 Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2024 03:26:01 -0700 Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.36]) by fmviesa008.fm.intel.com with ESMTP; 27 Mar 2024 03:26:00 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711535185; x=1743071185; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4uBrPQD7j2YTQaH7WlV2kQvQoG/tS0FkvYpS12K77DA=; b=UI/4Vz6sBm/rcuaEJKHM5ye+fRUuK3mpCChf6O9zC/O4Xoq+4xiVVeSg TeZmROjZz93OjdH/UVYL02PGbusPF/+drADtmpz4UcXM2D92+V9gLQ8aG 8CLxS1xRx+HA1Ak5D8u5VzEaEYpoSEu/peicKMVhafUwpIYjCmtvaT1Gj 7/dKDsKQ18ZRIqoevWvbHz7k9UV22jlGH8jw+y3q9S6XjzoYgLNA/8zQ7 +pndGCY1ck/sMU25o/Qeo6JYQYHy4OrFEUTVhfsvp9qUALh7nOjL85Qya SJIf89Yt+eI+eh2sltn3nBje3nYM1GQigvSOySordVThmGTcYxvdn5D19 w==; X-CSE-ConnectionGUID: xTTVWQA2QYy8YEFGgpb6Ag== X-CSE-MsgGUID: VmNjVjLKSAC12qJLLP+Daw== X-IronPort-AV: E=McAfee;i="6600,9927,11025"; a="6489761" X-IronPort-AV: E=Sophos;i="6.07,158,1708416000"; d="scan'208";a="6489761" X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,158,1708416000"; d="scan'208";a="16354481" From: Zhao Liu To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PATCH 3/3] target/i386/cpu: Merge the warning and error messages for AMD HT check Date: Wed, 27 Mar 2024 18:39:51 +0800 Message-Id: <20240327103951.3853425-4-zhao1.liu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327103951.3853425-1-zhao1.liu@linux.intel.com> References: <20240327103951.3853425-1-zhao1.liu@linux.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: none client-ip=192.198.163.19; envelope-from=zhao1.liu@linux.intel.com; helo=mgamail.intel.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.088, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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: 1711535237604100003 Content-Type: text/plain; charset="utf-8" From: Zhao Liu Currently, the difference between warn_report_once() and error_report_once() is the former has the "warning:" prefix, while the latter does not have a similar level prefix. At the meantime, considering that there is no error handling logic here, and the purpose of error_report_once() is only to prompt the user with an abnormal message, there is no need to use an error-level message here, and instead we can just use a warning. Therefore, downgrade the message in error_report_once() to warning, and merge it into the previous warn_report_once(). Signed-off-by: Zhao Liu --- target/i386/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 0487469d75f3..ec2787197d42 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7454,9 +7454,9 @@ static void x86_cpu_realizefn(DeviceState *dev, Error= **errp) !(env->features[FEAT_8000_0001_ECX] & CPUID_EXT3_TOPOEXT) && cs->nr_threads > 1) { warn_report_once("This family of AMD CPU doesn't support " - "hyperthreading(%d).", cs->nr_threads); - error_report_once("Please configure -smp options properly" - " or try enabling topoext feature."); + "hyperthreading(%d). Please configure -smp " + "options properly or try enabling topoext " + "feature.", cs->nr_threads); } =20 #ifndef CONFIG_USER_ONLY --=20 2.34.1