From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Luis R. Rodriguez" Subject: Re: [Xen-devel] MTRR on Xen - BIOS use and implications for Linux Date: Wed, 30 Mar 2016 00:28:15 +0200 Message-ID: <20160329222815.GB1990@wotan.suse.de> References: <56EA913F.1040403@citrix.com> <20160317185647.GR1990@wotan.suse.de> <1459289681.6393.714.camel@hpe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <1459289681.6393.714.camel@hpe.com> Sender: linux-kernel-owner@vger.kernel.org To: Toshi Kani Cc: "Luis R. Rodriguez" , David Vrabel , Toshi Kani , "xen-devel@lists.xensource.com" , Keir Fraser , Juergen Gross , X86 ML , Andrew Cooper , Stuart Hayes , "linux-kernel@vger.kernel.org" , Andy Lutomirski , Borislav Petkov , "H. Peter Anvin" , Paul McKenney , Yinghai Lu , Ingo Molnar , Prarit Bhargava List-Id: xen-devel@lists.xenproject.org On Tue, Mar 29, 2016 at 04:14:41PM -0600, Toshi Kani wrote: > On Tue, 2016-03-29 at 10:22 -0700, Luis R. Rodriguez wrote: > > On Thu, Mar 17, 2016 at 11:56 AM, Luis R. Rodriguez > > wrote: > > > On Thu, Mar 17, 2016 at 11:13:03AM +0000, David Vrabel wrote: > > > > On 16/03/16 20:08, Luis R. Rodriguez wrote: > > > > > Toshi noted a while ago as well that if BIOS/firmware enables= MTRR > > > > > but the kernel does not have it enabled one issue might have = been > > > > > any MTRRs set up by the BIOS and ensuring the mapping is resp= ected, > >=20 > > To be clear the requirement expressed here was needing at least to > > implement get_mtrr() on the Linux Xen guest side, it'd call the > > already implemented hypercall XENPF_read_memtype in turn. Toshi had > > hinted this was perhaps needed on the Linux Xen guest side given th= at > > the BIOS may have set up MTRRs on its own, so we needed the guest t= o > > be able to get the right type for a particular range. More on that > > below >=20 > No, I did not say that. :-) =A0I said it because you mentioned that y= ou > wanted to disable MTRRs even though BIOS enabled MTRRs. >=20 > My point is that the kernel should not change the MTRR setup. =A0That= is: > =A0- If BIOS enables MTRRs, then kernel needs to keep them enabled. > =A0- If BIOS disables MTRRs, then the kernel needs to keep them disab= led. >=20 > Therefore, the kernel can keep MTRRs disabled on Xen guests. Indeed, thanks for the clarification. That knocks this last concern out of the way. The remaining aspects then are simply optimizations considerations. Luis