Re: [PATCH] x86: kvm: Initialize static calls before SMP boot

From: Sean Christopherson

Date: Wed Mar 04 2026 - 14:19:28 EST


On Wed, Mar 04, 2026, David Sauerwein wrote:
> Updating static calls is expensive on wide SMP systems because all
> online CPUs need to act in a coordinated manner for code patching to
> work as expected.

Eww. I am very, very against an early_initcall() in KVM, even if we pinky swear
we'll never use it for anything except prefetching static_call() targets. The
initcall framework lacks the ability to express dependencies, and KVM most definitely
has dependencies on arch and subsys code.

I also don't like hacking KVM to workaround what is effectively a generic
infrastructure issue/limitation.

Have y'all looked at Valentin's series to defer IPIs? I assume/hope deferring
IPIs would reduce the delay observed when doing the patching.

https://lore.kernel.org/all/20251010153839.151763-1-vschneid@xxxxxxxxxx