lkml.org 
[lkml]   [2023]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v8 21/33] x86/fred: FRED initialization code
Date
On Mon, Apr 10 2023 at 01:14, Xin Li wrote:
> From: "H. Peter Anvin (Intel)" <hpa@zytor.com>
>
> The code to initialize FRED when it's available and _not_ disabled.
>
> cpu_init_fred_exceptions() is the core function to initialize FRED,
> which
> 1. Sets up FRED entrypoints for events happening in ring 0 and 3.
> 2. Sets up a default stack for event handling.
> 3. Sets up dedicated event stacks for DB/NMI/MC/DF, equivalent to
> the IDT IST stacks.
> 4. Forces 32-bit system calls to use "int $0x80" only.
> 5. Enables FRED and invalidtes IDT.
>
> When the FRED is used, cpu_init_exception_handling() initializes FRED
> through calling cpu_init_fred_exceptions(), otherwise it sets up TSS
> IST and loads IDT.
>
> As FRED uses the ring 3 FRED entrypoint for SYSCALL and SYSENTER,
> it skips setting up SYSCALL/SYSENTER related MSRs, e.g., MSR_LSTAR.

So how is this supposed to work? FRED is enabled in Kconfig, the feature
is detected and FRED is initialized _before_ the rest of the required
changes is in place.

Documentation/process/* is not just there because people have nothing
better to do than writing pointless documents.

Thanks,

tglx


\
 
 \ /
  Last update: 2023-06-05 14:16    [W:0.845 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site