[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47B2D54F.1000302@suse.de>
Date: Wed, 13 Feb 2008 12:32:31 +0100
From: Andi Kleen <ak@...e.de>
To: "Huang, Ying" <ying.huang@...el.com>
Cc: Ingo Molnar <mingo@...hat.com>,
ThomasGleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists