Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755242AbcCWOxz (ORCPT ); Wed, 23 Mar 2016 10:53:55 -0400 Received: from g4t3426.houston.hp.com ([15.201.208.54]:2017 "EHLO g4t3426.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752878AbcCWOxy (ORCPT ); Wed, 23 Mar 2016 10:53:54 -0400 Message-ID: <1458747975.6393.646.camel@hpe.com> Subject: Re: [PATCH v2 1/6] x86/mm/pat: Change PAT to support non-default PAT MSR 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: Wed, 23 Mar 2016 09:46:15 -0600 In-Reply-To: <20160323084305.GA8031@pd.tnic> References: <1458175502-31936-1-git-send-email-toshi.kani@hpe.com> <1458175502-31936-2-git-send-email-toshi.kani@hpe.com> <20160322165725.GB5656@pd.tnic> <1458671719.6393.565.camel@hpe.com> <20160323084305.GA8031@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: 1186 Lines: 30 On Wed, 2016-03-23 at 09:43 +0100, Borislav Petkov wrote: > On Tue, Mar 22, 2016 at 12:35:19PM -0600, Toshi Kani wrote: > > Right.  Will change to "Add support of non-default PAT MSR setting at > > handoff". > > Please remove this "handoff" notion from the text. Every hw register is > being handed off to the OS once the kernel takes over so there's no need > to make it special here. Will do. > > I'd like to make it clear that this function does not set PAT MSR, > > unlike what pat_init() does.  When CPU supports PAT, it keeps PAT MSR > > in whatever the setting at handoff, and initializes PAT table to match > > with this setting. > > > > I am open to a better name, but I am afraid that setup_pat() can be > > confusing as if it sets PAT MSR. > > So call it init_cache_modes() and rename the current > pat_init_cache_modes() to __init_cache_modes() to denote it is a lower > level helper of the init_cache_modes() one. The init_cache_modes() one > deals with the higher level figuring out of whether PAT is enabled and > if not, preparing the attr bits for emulation. In the end, it calls > __init_cache_modes(). All nice and easy. Good idea!  Will do. Thanks, -Toshi