Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752911AbcCJTLw (ORCPT ); Thu, 10 Mar 2016 14:11:52 -0500 Received: from g4t3426.houston.hp.com ([15.201.208.54]:23470 "EHLO g4t3426.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751808AbcCJTLq (ORCPT ); Thu, 10 Mar 2016 14:11:46 -0500 Message-ID: <1457640261.15454.551.camel@hpe.com> Subject: Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled" From: Toshi Kani To: Borislav Petkov , Paul Gortmaker Cc: Richard Purdie , Toshi Kani , Bruce Ashfield , "Hart, Darren" , "saul.wold" , linux-kernel@vger.kernel.org Date: Thu, 10 Mar 2016 13:04:21 -0700 In-Reply-To: <20160310172029.GA2194@pd.tnic> References: <1457129560.15454.266.camel@hpe.com> <20160307003501.GB26051@windriver.com> <1457366596.15454.281.camel@hpe.com> <20160307210852.GC26051@windriver.com> <1457393912.15454.419.camel@hpe.com> <20160307235328.GD26051@windriver.com> <1457398578.15454.421.camel@hpe.com> <1457400913.15454.435.camel@hpe.com> <20160310144250.GG23251@windriver.com> <1457628591.15454.542.camel@hpe.com> <20160310172029.GA2194@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: 1013 Lines: 28 On Thu, 2016-03-10 at 18:20 +0100, Borislav Petkov wrote: > On Thu, Mar 10, 2016 at 09:49:51AM -0700, Toshi Kani wrote: > > This confirms the issue - QEMU's virtual Intel CPU does not support > > MTRR.  > > > > When MTRR is disabled, the kernel does not call pat_init(). > >  pat_enabled() is still set to true when CONFIG_X86_PAT is set. > >  CONFIG_X86_PAT depends on CONFIG_MTRR, and assumes that MTRR is > > enabled.  > > Aha, so "qemu32" model doesn't support MTRRs but "kvm32" does, for > example. And so do the majority of the other CPU types. > > Paul, can you guys run with something else besides "qemu32"? You can > even take a 64-bit one and run a 32-bit guest on it. > > :-) > I will send a patch that sets PAT disabled when MTRR is disabled.  This will solve the Paul's issue.  His qemu32 model does not support PAT, either. Ideally, PAT and MTRR features should be managed independently, but this will require much more effort and will not be easily applied to stable. Thanks, -Toshi