Re: [PATCH v9 05/22] x86/cea: Use array indexing to simplify exception stack access

From: Xin Li

Date: Mon Oct 27 2025 - 22:32:54 EST




> On Oct 27, 2025, at 8:49 AM, Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
>
> On 10/26/25 13:18, Xin Li (Intel) wrote:
>> Refactor struct cea_exception_stacks to leverage array indexing for
>> exception stack access, improving code clarity and eliminating the
>> need for the ESTACKS_MEMBERS() macro.
>>
>> Convert __this_cpu_ist_{bottom,top}_va() from macros to functions,
>> allowing removal of the now-obsolete CEA_ESTACK_BOT and CEA_ESTACK_TOP
>> macros.
>>
>> Also drop CEA_ESTACK_SIZE, which just duplicated EXCEPTION_STKSZ.
>>
>> Signed-off-by: Xin Li (Intel) <xin@xxxxxxxxx>
>> ---
>>
>> Change in v9:
>> * Refactor first and then export in a separate patch (Dave Hansen).
>
> Thanks for the changes. This also removes the extra union{} that was in
> the last version for padding.

I would say you foresaw it because you suggested to use array indexing:

https://lore.kernel.org/lkml/720bc7ac-7e81-4ad9-8cc5-29ac540be283@xxxxxxxxx/

Thanks a lot for making it much cleaner.
Xin