public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Herrmann <andreas.herrmann3@amd.com>
To: Rene Herman <rene.herman@keyaccess.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org,
	Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
	Suresh B Siddha <suresh.b.siddha@intel.com>
Subject: Re: [PATCH 2/5] x86: PAT: fix ambiguous paranoia check in pat_init()
Date: Wed, 11 Jun 2008 18:12:34 +0200	[thread overview]
Message-ID: <20080611161234.GC5889@alberich.amd.com> (raw)
In-Reply-To: <484FCC09.7020606@keyaccess.nl>

On Wed, Jun 11, 2008 at 02:58:49PM +0200, Rene Herman wrote:
> On 11-06-08 11:41, Andreas Herrmann wrote:
>
>> As I had no Transmeta or Centaur CPU at hand I just cleared the PAT
>> flag in the CPU identification code to simulate the case that all CPUs
>> of a Vendor are whitelisted (even those w/o PAT support).  The first
>> time pat_init() is entered you get
>>   PAT enabled, but CPU feature cleared     (=> which is wrong as no flag 
>> was cleared)
>
> Again, you are misreading this. Please just replace the message mentally by 
> "PAT enabled, but CPU claims to not support PAT". "cleared" here does not 
> signify that we ourselves cleared anything, just that flag IS clear 
> (unset). Yes, maybe the wording could be better but it's not wrong.

Well, wording might not be best. But I don't care anymore.
(Just wondering which CPUs are out there that support PAT but don't
advertise it with any feature flag.)

>>   x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
>>     (=> which is wrong as PAT shouldn't be enabled on such CPUs)
>
> Again not wrong, or at least by design. Thomas Gleixner did it this way and 
> with that "paranoia check" explicitly bombing out only for SMP this 
> wouldn't have been by accident. He no doubt knows why he did so (and he's 
> in CC so if we're real lucky we might also now...)

I guess at the time Thomas' patch was commited this was just fine.

But with the recent Transmeta/Centaur patch, validate_pat_support()
returns w/o disabling PAT even for such vendor's CPUs that don't
support PAT,

To prevent this, validate_pat_support() should check for cpu_has_pat
in addition to any other white-black-or-whatsoever-listing.


Regards,

Andreas



  reply	other threads:[~2008-06-11 16:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-10 14:05 [PATCH 2/5] x86: PAT: fix ambiguous paranoia check in pat_init() Andreas Herrmann
2008-06-10 22:55 ` Rene Herman
2008-06-10 23:33   ` H. Peter Anvin
2008-06-11  9:47     ` Andreas Herrmann
2008-06-11 15:05       ` [PATCH] x86: enable PAT on (almost) all CPUs that advertise it Andreas Herrmann
2008-06-11 16:44         ` H. Peter Anvin
2008-06-11 17:35       ` [PATCH 2/5] x86: PAT: fix ambiguous paranoia check in pat_init() H. Peter Anvin
2008-06-11  9:41   ` Andreas Herrmann
2008-06-11 12:58     ` Rene Herman
2008-06-11 16:12       ` Andreas Herrmann [this message]
2008-06-12  4:32         ` Rene Herman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080611161234.GC5889@alberich.amd.com \
    --to=andreas.herrmann3@amd.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rene.herman@keyaccess.nl \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox