[lkml]   [2018]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 01/11] x86/mm: factor out pageattr _PAGE_GLOBAL setting
On 04/02/2018 10:52 AM, Linus Torvalds wrote:
> On Mon, Apr 2, 2018 at 10:27 AM, Dave Hansen
> <> wrote:
>> Aside: _PAGE_GLOBAL is ignored when CR4.PGE=1, so why do we
>> even go to the trouble of filtering it anywhere?
> I'm assuming this is a typo, and you mean "when CR4.PGE=0".

Yes, that is a typo.

> The question you raise may be valid, but within the particular context
> of *this* patch it is not.

I thought it was relevant because I was asking myself: Why is it OK for
the (old) code to be doing this:

> - if (pgprot_val(req_prot) & _PAGE_PRESENT)
> - pgprot_val(req_prot) |= _PAGE_PSE | _PAGE_GLOBAL;

When _PAGE_GLOBAL is not supported. This "Aside" got moved a bit away
from the comment, but I actually mean to refer to the comment that talks
about canon_pgprot():

>> canon_pgprot() will clear it if unsupported,
>> but we *always* set it.

and its use of __supported_pte_mask.

I'll redo the changelog a bit and hopefully capture all this along with
correcting the typo.

 \ /
  Last update: 2018-04-02 22:24    [W:0.032 / U:1.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site