lkml.org 
[lkml]   [2008]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: EFI runtime code mapping enhancement
Huang, Ying wrote:
> This patch enhances EFI runtime code memory mapping as following:
>
> - Move __supported_pte_mask & _PAGE_NX checking before invoking
> runtime_code_page_mkexec(). This makes it possible for compiler to
> eliminate runtime_code_page_mkexec() on machine without NX support.
>
> - Use set_memory_x/nx in early_mapping_set_exec(). This eliminates the
> duplicated implementation.

It's a inefficiency because you split up the 2MB (or 1GB) pages
in the direct mapping, although that is not strictly needed. This
means everybody who happens to use memory in same 2M/1G region
will eat unnecessary TLB misses.

It would be generally better to only execute your code in
ioremap_cache() because that won't affect anybody else.

Eventually set_memory_x() will work correctly for ioremap() too
so that should work then.

-Andi



\
 
 \ /
  Last update: 2008-02-13 12:35    [W:0.053 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site