Re: [PATCH 2/2] x86/cea: Index exception stacks by the ordering enum

From: Binbin Wu

Date: Mon Nov 23 2026 - 01:56:54 EST


On 11/21/2026 7:50 AM, Sohil Mehta wrote:
> The exception stacks are generated by ESTACKS_MEMBERS(), which pastes
> each stack name into a member name, once for the physical storage and
> once for the CEA mapping.
>
> The macro used to be the only thing keeping the two structures in the
> same order, but there is no ordering requirement left to enforce. The
> stacks are mapped one at a time and have been paired by name for a
> while. Also, the sizes stopped matching once the #VC stacks became
> config dependent.
>
> So, spell out the physical storage and index the mapping by the stack
> ordering enum. Also drop CEA_ESTACK_SIZE, which just duplicated
> EXCEPTION_STKSZ.
>
> The stack addresses and the guard pages are unchanged. No functional
> change intended.
>
> Signed-off-by: Sohil Mehta <sohil.mehta@xxxxxxxxx>

Reviewed-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>