Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752347AbbDBVDA (ORCPT ); Thu, 2 Apr 2015 17:03:00 -0400 Received: from cantor2.suse.de ([195.135.220.15]:50230 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751335AbbDBVC5 (ORCPT ); Thu, 2 Apr 2015 17:02:57 -0400 Date: Thu, 2 Apr 2015 23:02:53 +0200 From: "Luis R. Rodriguez" To: Bjorn Helgaas Cc: Konrad Rzeszutek Wilk , Andy Lutomirski , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Juergen Gross , Jan Beulich , Borislav Petkov , Suresh Siddha , venkatesh.pallipadi@intel.com, Dave Airlie , "linux-kernel@vger.kernel.org" , linux-fbdev , "x86@kernel.org" , "xen-devel@lists.xenproject.org" , Ingo Molnar , Daniel Vetter , Antonino Daplas , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Dave Hansen , Stefan Bader , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= , David Vrabel , Toshi Kani , Roger Pau =?iso-8859-1?Q?Monn=E9?= , xen-devel Subject: Re: [PATCH v1 02/47] x86: mtrr: generalize run time disabling of MTRR Message-ID: <20150402210253.GY5622@wotan.suse.de> References: <1426893517-2511-1-git-send-email-mcgrof@do-not-panic.com> <1426893517-2511-3-git-send-email-mcgrof@do-not-panic.com> <20150325195941.GM25884@l.oracle.com> <20150326233555.GE5622@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 2901 Lines: 68 On Thu, Apr 02, 2015 at 03:28:51PM -0500, Bjorn Helgaas wrote: > On Thu, Apr 2, 2015 at 3:20 PM, Luis R. Rodriguez wrote: > > On Thu, Apr 2, 2015 at 1:13 PM, Bjorn Helgaas wrote: > >> > >> On Thu, Mar 26, 2015 at 6:35 PM, Luis R. Rodriguez wrote: > >> > >> > I'll rephrase this to: > >> > > >> > --- > >> > It is possible to enable CONFIG_MTRR and up with it > >> > disabled at run time and yet CONFIG_X86_PAT continues > >> > to kick through with all functionally enabled. This > >> > can happen for instance on Xen where MTRR is not > >> > supported but PAT is, this can happen now on Linux as > >> > of commit 47591df50 by Juergen introduced as of v3.19. > >> > >> I still can't parse this. What does "up with it disabled at run time" > >> mean? > > > > It means that technically even if your CPU/BIOS/system did support > > MTRR if you use a kernel with MTRR support enabled you might end up > > with a situation where under one situation MTRR might be enabled and > > at another run time scenario with the same exact kernel and system you > > will end up with MTRR disabled. Such is the case for example when > > booting with Xen, which disables the CPU bits on the hypervisor code. > > If you boot the same system without Xen you'll get MTRR. > > Your text is missing some words. You seem to be using "up" as a verb, > but it's not a verb. Maybe you meant "end up"? Indeed. > Even then, it > wouldn't make sense for CONFIG_MTRR to be "disabled at run time" > because CONFIG_MTRR is a compile-time switch. The MTRR > *functionality* could certainly be disabled at run-time, but not > CONFIG_MTRR itself. I'll clarify. > >> And "... continues to kick through"? Probably some idiomatic > >> usage I'm just too old to understand :) > > > > That means for example that in both the above circumstances even if > > MTRR went disabled at run time with Xen, the kernel went through with > > getting PAT enabled. > > "CONFIG_X86_PAT continues to kick through" doesn't seem a very precise > way of describing this. But maybe it's enough for experts in this > area (which I'm not). I've rephrased this to: --- It is possible to enable CONFIG_MTRR and CONFIG_X86_PAT and end up with a system with MTRR functionality disabled PAT functionality enabled. This can happen for instance on Xen where MTRR is not supported but PAT is. This can happen on Linux as of commit 47591df50 ("xen: Support Xen pv-domains using PAT") by Juergen, introduced as of v3.19. --- Luis -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/