From patchwork Fri Feb 17 06:39:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haozhong Zhang X-Patchwork-Id: 9578887 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 C653F600C5 for ; Fri, 17 Feb 2017 06:43:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B788E2869B for ; Fri, 17 Feb 2017 06:43:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC5B2286A4; Fri, 17 Feb 2017 06:43:26 +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 3887E2869B for ; Fri, 17 Feb 2017 06:43:26 +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 1cecDp-0002Q5-48; Fri, 17 Feb 2017 06:40:49 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cecDn-0002O2-ON for xen-devel@lists.xen.org; Fri, 17 Feb 2017 06:40:47 +0000 Received: from [193.109.254.147] by server-2.bemta-6.messagelabs.com id F7/97-31242-FEA96A85; Fri, 17 Feb 2017 06:40:47 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPLMWRWlGSWpSXmKPExsVywNykWPfNrGU RBkuPK1ks+biYxYHR4+ju30wBjFGsmXlJ+RUJrBnXPz9iLVjLVfG4eyFTA+Mbji5GLg4hgWmM Em+mX2LuYuTkkBDglTiybAYrhO0nsevtWjaIol5GiU13rrOAJNgE9CVWPD4IViQiIC1x7fNlR pAiZoGzjBJL7jYwgSSEBTwkfu17yAZiswioSrzf8QLM5hWwldj24CDUNnmJC1dPgQ3lFLCT+P PwAzuILQRU8/7TPeYJjLwLGBlWMaoXpxaVpRbpmuglFWWmZ5TkJmbm6BoamOnlphYXJ6an5iQ mFesl5+duYgQGBAMQ7GDsvux/iFGSg0lJlHfRtGURQnxJ+SmVGYnFGfFFpTmpxYcYZTg4lCR4 uYEBJiRYlJqeWpGWmQMMTZi0BAePkggvB0iat7ggMbc4Mx0idYpRUUqc98ZMoIQASCKjNA+uD RYPlxhlpYR5GYEOEeIpSC3KzSxBlX/FKM7BqCTMewFkCk9mXgnc9FdAi5mAFndGLAVZXJKIkJ JqYAz1ZW/f8yEitnP/3W6e53eZF4hsvuL7Tkhg2d8e1bWfrq1bs2SmXf+bbL2CdQo/uUVaV1c /jBUNmd7Zv25RIHfT06Q+3cLp1WzubOY/1x87dlXSdd6XN6xhtQpX/H9HbemfvDhoxj7rvZsi Q9x6/gpGTJm5bwV/tvLGe9/a+h4084jWvLe4+leJpTgj0VCLuag4EQA4qtlEggIAAA== X-Env-Sender: haozhong.zhang@intel.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1487313633!34675007!5 X-Originating-IP: [192.55.52.115] 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 32853 invoked from network); 17 Feb 2017 06:40:44 -0000 Received: from mga14.intel.com (HELO mga14.intel.com) (192.55.52.115) by server-15.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 17 Feb 2017 06:40:44 -0000 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Feb 2017 22:40:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,171,1484035200"; d="scan'208";a="65781500" Received: from hz-desktop.sh.intel.com (HELO localhost) ([10.239.159.133]) by orsmga005.jf.intel.com with ESMTP; 16 Feb 2017 22:40:42 -0800 From: Haozhong Zhang To: xen-devel@lists.xen.org Date: Fri, 17 Feb 2017 14:39:22 +0800 Message-Id: <20170217063936.13208-6-haozhong.zhang@intel.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170217063936.13208-1-haozhong.zhang@intel.com> References: <20170217063936.13208-1-haozhong.zhang@intel.com> Cc: Haozhong Zhang , Christoph Egger , Andrew Cooper , Jan Beulich , Liu Jinsong Subject: [Xen-devel] [PATCH 05/19] x86/mce: merge loops to get Intel extended MC MSR 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 The second loop that gets MSR_IA32_MCG_R8 to MSR_IA32_MCG_R15 was surrounded by '#ifdef __X86_64__ ... #endif' and had to be seperated from the first loop that gets MSR_IA32_MCG_EAX to MSR_IA32_MCG_MISC. Because Xen had dropped support for 32-bit x86 host, these two loops can be merged now. Signed-off-by: Haozhong Zhang --- Cc: Christoph Egger Cc: Liu Jinsong Cc: Jan Beulich Cc: Andrew Cooper --- xen/arch/x86/cpu/mcheck/mce_intel.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/xen/arch/x86/cpu/mcheck/mce_intel.c b/xen/arch/x86/cpu/mcheck/mce_intel.c index 005e41d..498e8e4 100644 --- a/xen/arch/x86/cpu/mcheck/mce_intel.c +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c @@ -211,10 +211,7 @@ intel_get_extended_msrs(struct mcinfo_global *mig, struct mc_info *mi) mc_ext->common.type = MC_TYPE_EXTENDED; mc_ext->common.size = sizeof(struct mcinfo_extended); - for (i = MSR_IA32_MCG_EAX; i <= MSR_IA32_MCG_MISC; i++) - intel_get_extended_msr(mc_ext, i); - - for (i = MSR_IA32_MCG_R8; i <= MSR_IA32_MCG_R15; i++) + for (i = MSR_IA32_MCG_EAX; i <= MSR_IA32_MCG_R15; i++) intel_get_extended_msr(mc_ext, i); return mc_ext;