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

From: Toshi Kani
Date: Thu Mar 10 2016 - 14:19:37 EST


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:
> > > 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.
>
> 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?

It turns out that your qemu's virtual CPU does not support PAT, either. :-)
ÂSo, it is consistent on this regard. ÂI will send patches to address this
issue.

Thanks,
-Toshi