Re: [RFC][PATCH 11/34] x86/cpu/intel: Prepare MKTME for "address configuration" infrastructure

Kirill A. Shutemov
2024-02-23T11:33:04Z

On Thu, Feb 22, 2024 at 10:39:41AM -0800, Dave Hansen wrote:
>
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> Intel also does memory encryption and also fiddles with the physical
> address bits. This is currently called for *each* CPU, but practically
> only done on the boot CPU because of 'mktme_status'.
>
> Move it from the "each CPU" ->c_init() function to ->c_bsp_init() where
> the whole thing only gets called once ever. This also necessitates moving
> detect_tme() and its entourage around in the file.

The state machine around mktme_state doesn't make sense if we only call it
on boot CPU, so detect_tme() can be drastically simplified. I can do it on
top of the patchset.

--
Kiryl Shutsemau / Kirill A. Shutemov