Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-12 Thread Borislav Petkov
On Fri, Mar 11, 2016 at 11:29:54PM +, Richard Purdie wrote: > ... and if I remember rightly, the CPU features the kvm* options > provide vary quite widely and wasn't consistent. How so? Please elaborate so that we can fix those. Btw, your reproducer works fine with -cpu kvm32 - only vncviewer

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-11 Thread Richard Purdie
On Fri, 2016-03-11 at 17:28 -0500, Bruce Ashfield wrote: > On 2016-03-11 5:16 PM, Borislav Petkov wrote: > > On Fri, Mar 11, 2016 at 08:18:23PM +0100, Paolo Bonzini wrote: > > > Somebody got it wrong 10-ish years ago, and nobody has ever > > > checked since. > > > > > > But, don't use qemu32 or qe

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-11 Thread Bruce Ashfield
On 2016-03-11 5:16 PM, Borislav Petkov wrote: On Fri, Mar 11, 2016 at 08:18:23PM +0100, Paolo Bonzini wrote: Somebody got it wrong 10-ish years ago, and nobody has ever checked since. But, don't use qemu32 or qemu64. Use kvm32 and kvm64, or better something like the host you run on ("-cpu Neha

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-11 Thread Borislav Petkov
On Fri, Mar 11, 2016 at 08:18:23PM +0100, Paolo Bonzini wrote: > Somebody got it wrong 10-ish years ago, and nobody has ever checked since. > > But, don't use qemu32 or qemu64. Use kvm32 and kvm64, or better > something like the host you run on ("-cpu Nehalem", "-cpu SandyBridge", > "-cpu Haswell

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-11 Thread Paolo Bonzini
On 11/03/2016 14:40, Borislav Petkov wrote: > On Fri, Mar 11, 2016 at 01:23:56PM +, One Thousand Gnomes wrote: >> > Pentium Pro has MTRR, PAT came later. > Yep, this page says so too: > > http://www.cpu-world.com/CPUs/Pentium-II/Intel-Pentium%20Pro%20200%201%20MB%20-%20GJ80521EX200%201M%20%2

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-11 Thread Borislav Petkov
On Fri, Mar 11, 2016 at 01:23:56PM +, One Thousand Gnomes wrote: > Pentium Pro has MTRR, PAT came later. Yep, this page says so too: http://www.cpu-world.com/CPUs/Pentium-II/Intel-Pentium%20Pro%20200%201%20MB%20-%20GJ80521EX200%201M%20%28BP80521200%201M%29.html > I believe the qemu32 CPU isn

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-11 Thread One Thousand Gnomes
On Thu, 10 Mar 2016 20:19:33 +0100 Borislav Petkov wrote: > On Thu, Mar 10, 2016 at 02:04:29PM -0500, Paul Gortmaker wrote: > > So, I guess that is a qemu bug? If there is no real silicon out there > > that has no MTRR but does claim PAT, then qemu32 is a flawed CPU type? > > Well, AFAICT, "q

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-10 Thread Toshi Kani
On Thu, 2016-03-10 at 22:07 +0100, Borislav Petkov wrote: > On Thu, Mar 10, 2016 at 01:24:11PM -0700, Toshi Kani wrote: > > I am not familiar with PPRO_FEATURES, > > That's the feature bits of the "qemu32" model, and others, in qemu. > > > but shouldn't 'flags' in /proc/cpuinfo show "pat" when X8

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-10 Thread Borislav Petkov
On Thu, Mar 10, 2016 at 01:24:11PM -0700, Toshi Kani wrote: > I am not familiar with PPRO_FEATURES, That's the feature bits of the "qemu32" model, and others, in qemu. > but shouldn't 'flags' in /proc/cpuinfo show "pat" when X86_FEATURE_PAT is set? static void early_init_intel(struct cpuinfo_x86

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-10 Thread Toshi Kani
On Thu, 2016-03-10 at 20:20 +0100, Borislav Petkov wrote: > On Thu, Mar 10, 2016 at 01:04:21PM -0700, Toshi Kani wrote: > > 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. > > It does, see

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-10 Thread Borislav Petkov
On Thu, Mar 10, 2016 at 01:04:21PM -0700, Toshi Kani wrote: > 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. It does, see my other mail. We need to figure out first why is pat_init() being cal

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-10 Thread Borislav Petkov
On Thu, Mar 10, 2016 at 02:04:29PM -0500, Paul Gortmaker wrote: > So, I guess that is a qemu bug? If there is no real silicon out there > that has no MTRR but does claim PAT, then qemu32 is a flawed CPU type? Well, AFAICT, "qemu32" is emulating something PPRO-like: #define PPRO_FEATURES (CPUID_F

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-10 Thread Toshi Kani
On Thu, 2016-03-10 at 14:04 -0500, Paul Gortmaker wrote: > [Re: runtime regression with "x86/mm/pat: Emulate PAT when it is > disabled"] On 10/03/2016 (Thu 18:20) Borislav Petkov wrote: > > > On Thu, Mar 10, 2016 at 09:49:51AM -0700, Toshi Kani wrote: > > >

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-10 Thread Toshi Kani
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

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-10 Thread Paul Gortmaker
[Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"] On 10/03/2016 (Thu 18:20) 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.  > &

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-10 Thread Borislav Petkov
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 > CO

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-10 Thread Toshi Kani
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: > > [...] > >

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-10 Thread Paul Gortmaker
[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 gues

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-08 Thread Toshi Kani
On Tue, 2016-03-08 at 11:03 -0500, Paul Gortmaker wrote: > [Re: runtime regression with "x86/mm/pat: Emulate PAT when it is > disabled"] On 08/03/2016 (Tue 09:13) Toshi Kani wrote: > > [...] > > > > > Yes, I have these directories, but I do not see anything

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-08 Thread Paul Gortmaker
[Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"] On 08/03/2016 (Tue 09:13) Toshi Kani wrote: [...] > > Yes, I have these directories, but I do not see anything under them...  Now > that I do not think there is anything unique in your .config file,

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-08 Thread Toshi Kani
On Mon, 2016-03-07 at 22:28 -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: > > > On Mon, 2016-03

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-08 Thread Toshi Kani
On Mon, 2016-03-07 at 22:16 -0500, Paul Gortmaker wrote: > [Re: runtime regression with "x86/mm/pat: Emulate PAT when it is > disabled"] On 07/03/2016 (Mon 17:56) Toshi Kani wrote: > > [..] > > > > > > It may have seemed working before, but you did not h

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-07 Thread Paul Gortmaker
[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: > > On Mon, 2016-03-07 at 18:53 -0500, Paul Gortmaker wrote: > > > [Re: runtime regression w

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-07 Thread Paul Gortmaker
[Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"] On 07/03/2016 (Mon 17:56) Toshi Kani wrote: [..] > > > It may have seemed working before, but you did not have WC configured > > > to PAT without calling pat_init().  There was not a pr

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-07 Thread Toshi Kani
On Mon, 2016-03-07 at 17:56 -0700, Toshi Kani wrote: > On Mon, 2016-03-07 at 18:53 -0500, Paul Gortmaker wrote: > > [Re: runtime regression with "x86/mm/pat: Emulate PAT when it is > > disabled"] On 07/03/2016 (Mon 16:38) Toshi Kani wrote: > > > > >

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-07 Thread Toshi Kani
On Mon, 2016-03-07 at 18:53 -0500, Paul Gortmaker wrote: > [Re: runtime regression with "x86/mm/pat: Emulate PAT when it is > disabled"] On 07/03/2016 (Mon 16:38) Toshi Kani wrote: > > > On Mon, 2016-03-07 at 16:08 -0500, Paul Gortmaker wrote: > > > [droppin

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-07 Thread Paul Gortmaker
[Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"] On 07/03/2016 (Mon 16:38) Toshi Kani wrote: > On Mon, 2016-03-07 at 16:08 -0500, Paul Gortmaker wrote: > > [dropping oe list and lkml since attaching dmesg files.] > > [...] > > > Ye

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-07 Thread Toshi Kani
On Mon, 2016-03-07 at 16:08 -0500, Paul Gortmaker wrote: > [dropping oe list and lkml since attaching dmesg files.] > > [Re: runtime regression with "x86/mm/pat: Emulate PAT when it is > disabled"] On 07/03/2016 (Mon 09:03) Toshi Kani wrote: > > > On Sun,

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-07 Thread Toshi Kani
On Sun, 2016-03-06 at 19:35 -0500, Paul Gortmaker wrote: > [Re: runtime regression with "x86/mm/pat: Emulate PAT when it is > disabled"] On 04/03/2016 (Fri 15:12) Toshi Kani wrote: > > > On Fri, 2016-03-04 at 13:37 -0500, Paul Gortmaker wrote: > > > [Re: r

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-06 Thread Paul Gortmaker
[Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"] On 04/03/2016 (Fri 15:12) Toshi Kani wrote: > On Fri, 2016-03-04 at 13:37 -0500, Paul Gortmaker wrote: > > [Re: runtime regression with "x86/mm/pat: Emulate PAT when it is > > disabled&quo

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-04 Thread Toshi Kani
On Fri, 2016-03-04 at 13:37 -0500, Paul Gortmaker wrote: > [Re: runtime regression with "x86/mm/pat: Emulate PAT when it is > disabled"] On 03/03/2016 (Thu 22:02) Toshi Kani wrote: > > > On Thu, 2016-03-03 at 15:59 -0500, Paul Gortmaker wrote:  : > > > > &

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-04 Thread Paul Gortmaker
[Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"] On 03/03/2016 (Thu 22:02) Toshi Kani wrote: > On Thu, 2016-03-03 at 15:59 -0500, Paul Gortmaker wrote: > > So, the yocto folks moved from 4.1 to 4.4 and one of their automated > > qemu x86-32 b

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-03 Thread Toshi Kani
On Thu, 2016-03-03 at 15:59 -0500, Paul Gortmaker wrote: > So, the yocto folks moved from 4.1 to 4.4 and one of their automated > qemu x86-32 boot tests started failing.  None of the yocto details seem > to matter since I offered to help and I've repropduced it using 100% > mainline kernels and a g

Re: runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-03 Thread Paul Gortmaker
[runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"] On 03/03/2016 (Thu 15:59) Paul Gortmaker wrote: > So, the yocto folks moved from 4.1 to 4.4 and one of their automated > qemu x86-32 boot tests started failing. None of the yocto details seem > to matter

runtime regression with "x86/mm/pat: Emulate PAT when it is disabled"

2016-03-03 Thread Paul Gortmaker
So, the yocto folks moved from 4.1 to 4.4 and one of their automated qemu x86-32 boot tests started failing. None of the yocto details seem to matter since I offered to help and I've repropduced it using 100% mainline kernels and a generic distro toolchain as well. The test case is slightly compl