Re: [PATCH v12 00/16] AMD broadcast TLB invalidation
From: Rik van Riel
Date: Sat Feb 22 2025 - 11:06:09 EST
On Sat, 2025-02-22 at 12:29 +0100, Oleksandr Natalenko wrote:
>
> [ 24.381400] RIP: 0010:get_cpu_cap+0x39b/0x4f0
>
> $ scripts/faddr2line arch/x86/kernel/cpu/common.o get_cpu_cap+0x39b
> get_cpu_cap+0x39b/0x500:
> get_cpu_cap at …/arch/x86/kernel/cpu/common.c:1063
>
> 1060 if (c->extended_cpuid_level >= 0x80000008) {
> 1061 cpuid(0x80000008, &eax, &ebx, &ecx, &edx);
> 1062 c->x86_capability[CPUID_8000_0008_EBX] = ebx;
> 1063 invlpgb_count_max = (edx & 0xffff) + 1;
> 1064 }
> ```
>
> Any idea what I'm looking at?
It's crashing when writing the value to the
invlpgb_count_max variable.
This would be because:
1) invlpgb_count_max is marked __ro_after_init, making
it read-only after the system has finished booting, but
2) get_cpu_cap gets run at resume and CPU hotplug time!
Borislav, do you prefer I move the initialization of
invlpgb_count_max back to where it was before, or get
rid of the __ro_after_init thing?
--
All Rights Reversed.