Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753364AbcCJP5Z (ORCPT ); Thu, 10 Mar 2016 10:57:25 -0500 Received: from g4t3427.houston.hp.com ([15.201.208.55]:44110 "EHLO g4t3427.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753222AbcCJP5S (ORCPT ); Thu, 10 Mar 2016 10:57:18 -0500 Message-ID: <1457628591.15454.542.camel@hpe.com> Subject: Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled" From: Toshi Kani To: Paul Gortmaker Cc: Borislav Petkov , Richard Purdie , Toshi Kani , Bruce Ashfield , "Hart, Darren" , "saul.wold" , linux-kernel@vger.kernel.org Date: Thu, 10 Mar 2016 09:49:51 -0700 In-Reply-To: <20160310144250.GG23251@windriver.com> References: <1457067768.15454.181.camel@hpe.com> <20160304183713.GA26051@windriver.com> <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> 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: 2000 Lines: 77 On Thu, 2016-03-10 at 09:42 -0500, Paul Gortmaker wrote: > [Re: runtime regression with "x86/mm/pat: Emulate PAT when it is > disabled"] On 07/03/2016 (Mon 18:35) Toshi Kani wrote: > > > On Mon, 2016-03-07 at 17:56 -0700, Toshi Kani wrote: > > [...] > > > And also an output of /proc/cpuinfo, please? > > Here is the output of /proc/cpuinfo in the guest session, while > running on pentium dual core as host (no vmx): > > > processor : 0 > vendor_id : GenuineIntel > cpu family : 6 > model : 6 > model name : QEMU Virtual CPU version 2.5+ > stepping : 3 > cpu MHz : 2593.449 > cache size : 4096 KB > physical id : 0 > siblings : 1 > core id : 0 > cpu cores : 1 > apicid : 0 > initial apicid : 0 > fdiv_bug : no > f00f_bug : no > coma_bug : no > fpu : yes > fpu_exception : yes > cpuid level : 4 > wp : yes > flags : fpu de pse tsc msr pae mce cx8 apic sep pge cmov > mmx fxsr sse sse2 pni hypervisor > bugs : > bogomips : 5186.89 > clflush size : 32 > cache_alignment : 32 > address sizes : 36 bits physical, 32 bits virtual > power management: 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.  Thanks, -Toshi > > Paul. > -- > > > > > I think I know what's going on.  I noticed that you have the following > > message in your dmesg files. > > > >  [    0.000000] MTRR: Disabled > > > > MTRR is set to disabled when your CPU is Intel but does not support > > MTRR. > >  Perhaps, QEMU does not emulate MTRR? > > > > pat_init() is not called when MTRR is disabled.  I think this > > dependency is > > wrong, and it needs to be fixed. > > > > This issue has been there for a long time, and you have been running > > essentially as PAT disabled in the past.  The commit in question simply > > detected this issue. > > > > Thanks, > > -Toshi