Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754624AbcCOA31 (ORCPT ); Mon, 14 Mar 2016 20:29:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:57874 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754561AbcCOA3Z (ORCPT ); Mon, 14 Mar 2016 20:29:25 -0400 Date: Tue, 15 Mar 2016 01:29:21 +0100 From: "Luis R. Rodriguez" To: Borislav Petkov Cc: Toshi Kani , "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 Subject: Re: [PATCH 1/2] x86/mm/pat: Change pat_disable() to emulate PAT table Message-ID: <20160315002921.GG25147@wotan.suse.de> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160312115544.GA23410@pd.tnic> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 625 Lines: 24 I like this approach more as it stuff more PAT setup on its own type of calls, but: On Sat, Mar 12, 2016 at 12:55:44PM +0100, Borislav Petkov wrote: > diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c > index 10f8d4796240..5c442b4bd52a 100644 > --- a/arch/x86/kernel/cpu/mtrr/main.c > +++ b/arch/x86/kernel/cpu/mtrr/main.c > @@ -759,8 +761,11 @@ void __init mtrr_bp_init(void) > } > } > > - if (!mtrr_enabled()) > + if (!__mtrr_enabled) { > pr_info("MTRR: Disabled\n"); > + pat_disable("PAT disabled by MTRR"); > + pat_setup(); > + } > } This hunk would break PAT on Xen. Luis