[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dbdf6c3bbaf95cb8ce9531a66a99f8b70b6f67e1.camel@intel.com>
Date: Mon, 25 Mar 2024 12:04:31 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
CC: "tglx@...utronix.de" <tglx@...utronix.de>, "jgross@...e.com"
<jgross@...e.com>, "x86@...nel.org" <x86@...nel.org>, "bp@...en8.de"
<bp@...en8.de>
Subject: Re: [PATCH 3/4] x86/boot: Explicitly pass NX enabling status
On Fri, 2024-03-22 at 10:56 -0700, Dave Hansen wrote:
> From: Dave Hansen <dave.hansen@...ux.intel.com>
>
> The kernel sometimes needs to mask unsupported bits out of page
> table entries. It does that with a mask: '__supported_pte_mask'.
>
> That mask can obviously only contain the No-eXecute bit ( _PAGE_NX)
^ unnecessary space
> on hardware where NX is supported. x86_configure_nx() checks the
> boot CPU's NX support and adjusts the mask appropriately.
>
> But it doesn't check support directly. It uses the venerable
> 'boot_cpu_data' which is a software approximation of the actual CPU
> support. Unfortunately, Xen wants to set up '__supported_pte_mask'
> before 'boot_cpu_data' has been initialized. It hacks around this
> problem by repeating some of the 'boot_cpu_data' setup *just* for
> NX.
>
> Have x86_configure_nx() stop consulting 'boot_cpu_data' and move
> the NX detection to the caller.
>
> No functional change. That will come later.
>
> Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
Reviewed-by: Kai Huang <kai.huang@...el.com>
Powered by blists - more mailing lists