Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756246AbcCOOut (ORCPT ); Tue, 15 Mar 2016 10:50:49 -0400 Received: from g4t3427.houston.hp.com ([15.201.208.55]:40019 "EHLO g4t3427.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754889AbcCOOuq (ORCPT ); Tue, 15 Mar 2016 10:50:46 -0400 Message-ID: <1458056595.6393.332.camel@hpe.com> Subject: Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table From: Toshi Kani To: Borislav Petkov Cc: "Luis R. Rodriguez" , "mingo@kernel.org" , "hpa@zytor.com" , "tglx@linutronix.de" , "jgross@suse.com" , "paul.gortmaker@windriver.com" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "xen-devel@lists.xenproject.org" , "boris.ostrovsky@oracle.com" Date: Tue, 15 Mar 2016 09:43:15 -0600 In-Reply-To: <20160315110148.GC4559@pd.tnic> References: <1457671546-13486-1-git-send-email-toshi.kani@hpe.com> <1457671546-13486-2-git-send-email-toshi.kani@hpe.com> <20160311091229.GA4347@pd.tnic> <1457713660.6393.55.camel@hpe.com> <20160311155439.GF4312@pd.tnic> <1457724504.6393.151.camel@hpe.com> <20160312115544.GA23410@pd.tnic> <20160315002921.GG25147@wotan.suse.de> <1458011476.6393.327.camel@hpe.com> <20160315110148.GC4559@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: 595 Lines: 15 On Tue, 2016-03-15 at 11:01 +0000, Borislav Petkov wrote: > On Mon, Mar 14, 2016 at 09:11:16PM -0600, Toshi Kani wrote: > > - pat = PAT(0, WB) | PAT(1, WT) | PAT(2, UC_MINUS) | PAT(3, UC) > > | > > -       PAT(4, WB) | PAT(5, WT) | PAT(6, UC_MINUS) | PAT(7, UC); > > + if (cpu_has_pat) { > > Please use on init paths boot_cpu_has(X86_FEATURE_PAT) and on fast paths > static_cpu_has(X86_FEATURE_PAT). No more of that cpu_has_XXX ugliness. 'cpu_has_pat' is defined as 'boot_cpu_has(X86_FEATURE_PAT)'.  Do you mean it should explicitly use 'boot_cpu_has(X86_FEATURE_PAT)'? Thanks, -Toshi