Re: [PATCH v8 05/21] x86/cea: Export API for per-CPU exception stacks for KVM

Xin Li
2025-10-23T08:56:40Z

>> FRED introduced new fields in the host-state area of the VMCS for stack
>> levels 1->3 (HOST_IA32_FRED_RSP[123]), each respectively corresponding to
>> per-CPU exception stacks for #DB, NMI and #DF. KVM must populate these
>> fields each time a vCPU is loaded onto a CPU.
>
>> +noinstr unsigned long __this_cpu_ist_top_va(enum exception_stack_ordering stack)
>> +{
>> + return __this_cpu_ist_bottom_va(stack) + EXCEPTION_STKSZ;
>> +}
>> +EXPORT_SYMBOL(__this_cpu_ist_top_va);
>
> This has no business being a !GPL export. But please use:
>
> EXPORT_SYMBOL_FOR_MODULES(__this_cpu_ist_top_val, "kvm");
>
> (or "kvm-intel", depending on which actual module ends up needing this
> symbol).

Will do “kvm-intel” because that is the only module uses the APIs.