On 27.01.2026 15:09, Andrew Cooper wrote: > On 27/01/2026 2:05 pm, Jan Beulich wrote: >> On 26.01.2026 18:53, Andrew Cooper wrote: >>> --- a/xen/arch/x86/cpu/common.c >>> +++ b/xen/arch/x86/cpu/common.c >>> @@ -503,8 +503,8 @@ void identify_cpu(struct cpuinfo_x86 *c) >>> if (c->extended_cpuid_level >= 0x80000021) >>> c->x86_capability[FEATURESET_e21a] = cpuid_eax(0x80000021); >>> >>> - if (actual_cpu.c_early_init) >>> - alternative_vcall(actual_cpu.c_early_init, c); >>> + if (c == &boot_cpu_data && actual_cpu.c_early_init) >>> + alternative_vcall(actual_cpu.c_early_init); >> Using alternative_vcall() then doesn't make any sense anymore, does it? > > It is still needed here, because this is .text and is a Spectre v1 into > v2 gadget otherwise.
Hmm, I may not fully understand this. Is this because after patching the direct call becomes unsuitable for such a use, especially after .init.text was unmapped? > I've dropped alternative_vcall() in patch 7 where it becomes safe to do so. Yes, I've meanwhile seen that. Jan
