Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753492AbcCVVJ5 (ORCPT ); Tue, 22 Mar 2016 17:09:57 -0400 Received: from g4t3426.houston.hp.com ([15.201.208.54]:50715 "EHLO g4t3426.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752484AbcCVVJv (ORCPT ); Tue, 22 Mar 2016 17:09:51 -0400 Message-ID: <1458684133.6393.630.camel@hpe.com> Subject: Re: [PATCH v2 4/6] x86/mtrr: Fix PAT init handling when MTRR MSR is disabled From: Toshi Kani To: Borislav Petkov Cc: mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de, mcgrof@suse.com, jgross@suse.com, paul.gortmaker@windriver.com, konrad.wilk@oracle.com, elliott@hpe.com, x86@kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Date: Tue, 22 Mar 2016 16:02:13 -0600 In-Reply-To: <20160322170135.GE5656@pd.tnic> References: <1458175619-32206-1-git-send-email-toshi.kani@hpe.com> <1458175619-32206-3-git-send-email-toshi.kani@hpe.com> <20160322170135.GE5656@pd.tnic> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.4 (3.18.4-1.fc23) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1050 Lines: 46 On Tue, 2016-03-22 at 18:01 +0100, Borislav Petkov wrote: > Subject: [PATCH v2 4/6] x86/mtrr: Fix PAT init handling when MTRR MSR is > disabled > > s/ MSR// Will do. > On Wed, Mar 16, 2016 at 06:46:57PM -0600, Toshi Kani wrote: > > get_mtrr_state() calls pat_init() on BSP even if MTRR is disabled > > by its MSR. > > s/by its MSR// Will do. > > This causes pat_init() to be called on BSP only since APs do not call > > This doesn't cause that - get_mtrr_state() is called only on the BSP by > mtrr_bp_init(). Right, I will change it to "results" or something. > > pat_init() when MTRR is disabled. This inconsistency between BSP and > > APs leads undefined behavior. > >       leads to Will do. > > Move BSP's PAT init code from get_mtrr_state() to mtrr_bp_pat_init(). > > Change mtrr_bp_init() to call mtrr_bp_pat_init() if MTRR is enabled. > > No need for those. OK. > > This keeps BSP's calling condition to pat_init() consistent with AP's, > > mtrr_ap_init() and mtrr_aps_init(). > > This one is fine. :-) Thanks, -Toshi