Re: [PATCH hyperv-next v2] arch/x86: Provide the CPU number in the wakeup AP callback

From: Thomas Gleixner
Date: Wed Apr 30 2025 - 16:07:37 EST


On Wed, Apr 30 2025 at 14:44, Tom Lendacky wrote:
> On 4/30/25 14:33, Thomas Gleixner wrote:
>> bool __weak arch_match_cpu_phys_id(int cpu, u64 phys_id)
>> {
>> return (u32)phys_id == cpu;
>> }
>
> There is an x86 version of this function in arch/x86/kernel/cpu/topology.c
> that overrides the __weak definition and does:
>
> bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
> {
> return phys_id == (u64)cpuid_to_apicid[cpu];
> }

Oops. I missed that somehow. So yes, aside of the signed/unsigned thing
this looks fine.

Thanks,

tglx