From patchwork Fri Mar 17 06:46:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haozhong Zhang X-Patchwork-Id: 9629903 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9B8DC60245 for ; Fri, 17 Mar 2017 06:48:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C18528698 for ; Fri, 17 Mar 2017 06:48:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80F342869C; Fri, 17 Mar 2017 06:48:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 36E8728698 for ; Fri, 17 Mar 2017 06:48:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1colen-0000SC-J3; Fri, 17 Mar 2017 06:46:37 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1colel-0000R7-Cu for xen-devel@lists.xen.org; Fri, 17 Mar 2017 06:46:35 +0000 Received: from [85.158.143.35] by server-1.bemta-6.messagelabs.com id 91/13-27678-A468BC85; Fri, 17 Mar 2017 06:46:34 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHLMWRWlGSWpSXmKPExsVywNxEW9er7XS Ewc6zHBZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa0bPtbmsBf0CFc8nnmNpYLzB3cXIySEkUCFx 7mkTO4gtIcArcWTZDFYIO0Bi4YWPLF2MXEA1vYwSD1fvZQRJsAnoS6x4fBCsSERAWuLa58tgc WaBaomJ0+eA2cICPhJvrq9jBrFZBFQl3uxZzAZi8wrYSmy9e4wZYoG8xIWrp1hAbE4BO4mPjb dYIA6ylWhsuM00gZF3ASPDKkaN4tSistQiXUNLvaSizPSMktzEzBxdQwMzvdzU4uLE9NScxKR iveT83E2MwHBgAIIdjD+WBRxilORgUhLlVRE8ESHEl5SfUpmRWJwRX1Sak1p8iFGGg0NJgpe7 ACgnWJSanlqRlpkDDEyYtAQHj5IIbylImre4IDG3ODMdInWKUVFKnLcKJCEAksgozYNrg0XDJ UZZKWFeRqBDhHgKUotyM0tQ5V8xinMwKgnzsoFM4cnMK4Gb/gpoMRPQ4sSfR0AWlyQipKQaGC UeeTneXsnG7r1aUe/ZkrgtVb0i/M1bk3on+n9Zt55R49d53dOX3gTcZtPf4zex8Mopzr0pBg0 n3O9xfMxw3brypvkpKevobWtORS24bli7izFNJHFP8uZLwueVnU2n3tItVXoVJHsjvavEl43Z eKrry9KDSncKZ/36darzrc5nuW+b7L/tXqLEUpyRaKjFXFScCAAQzYtFgQIAAA== X-Env-Sender: haozhong.zhang@intel.com X-Msg-Ref: server-11.tower-21.messagelabs.com!1489733189!62664741!2 X-Originating-IP: [192.55.52.43] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 38826 invoked from network); 17 Mar 2017 06:46:32 -0000 Received: from mga05.intel.com (HELO mga05.intel.com) (192.55.52.43) by server-11.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 17 Mar 2017 06:46:32 -0000 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP; 16 Mar 2017 23:46:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.36,175,1486454400"; d="scan'208"; a="1109452583" Received: from hz-desktop.sh.intel.com (HELO localhost) ([10.239.159.153]) by orsmga001.jf.intel.com with ESMTP; 16 Mar 2017 23:46:29 -0700 From: Haozhong Zhang To: xen-devel@lists.xen.org Date: Fri, 17 Mar 2017 14:46:04 +0800 Message-Id: <20170317064614.23539-3-haozhong.zhang@intel.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170317064614.23539-1-haozhong.zhang@intel.com> References: <20170317064614.23539-1-haozhong.zhang@intel.com> Cc: Haozhong Zhang , Jan Beulich , Andrew Cooper Subject: [Xen-devel] [PATCH v2 02/12] x86/mce_intel: refine messages of MCA capabilities X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP ... to only print available ones. Signed-off-by: Haozhong Zhang Reviewed-by: Jan Beulich --- Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/cpu/mcheck/mce_intel.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/cpu/mcheck/mce_intel.c b/xen/arch/x86/cpu/mcheck/mce_intel.c index b0d8280..48f41d6 100644 --- a/xen/arch/x86/cpu/mcheck/mce_intel.c +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c @@ -724,11 +724,15 @@ static void intel_init_mca(struct cpuinfo_x86 *c) first = mce_firstbank(c); +#define CAP(enabled, name) ((enabled) ? ", "name : "") if (smp_processor_id() == 0) { - dprintk(XENLOG_INFO, "MCA Capability: BCAST %x SER %x" - " CMCI %x firstbank %x extended MCE MSR %x\n", - broadcast, ser, cmci, first, ext_num); + dprintk(XENLOG_INFO, + "MCA Capability: firstbank %d, extended MCE MSR %d%s%s%s\n", + first, ext_num, + CAP(broadcast, "BCAST"), + CAP(ser, "SER"), + CAP(cmci, "CMCI")); mce_broadcast = broadcast; cmci_support = cmci; @@ -739,12 +743,15 @@ static void intel_init_mca(struct cpuinfo_x86 *c) else if (cmci != cmci_support || ser != ser_support || broadcast != mce_broadcast || first != firstbank || ext_num != nr_intel_ext_msrs) - { dprintk(XENLOG_WARNING, - "CPU %u has different MCA capability (%x,%x,%x,%x,%x)" + "CPU %u has different MCA capability " + "(firstbank %d, extended MCE MSR %d%s%s%s)" " than BSP, may cause undetermined result!!!\n", - smp_processor_id(), broadcast, ser, cmci, first, ext_num); - } + smp_processor_id(), first, ext_num, + CAP(broadcast, "BCAST"), + CAP(ser, "SER"), + CAP(cmci, "CMCI")); +#undef CAP } static void intel_mce_post_reset(void)