[PATCH] KVM: arm64: vgic: Serialise CTRL_INIT against vCPU creation

Marc Zyngier maz at kernel.org
Tue Nov 3 05:05:42 PST 2026


On Fri, 04 Sep 2026 17:44:20 +0000, Sascha Bischoff wrote:
> vgic_init() compares created_vcpus with online_vcpus to detect a vCPU
> being created. However, CTRL_INIT only holds config_lock, while
> admission of new vCPUs and updates to created_vcpus are protected by
> kvm->lock.
> 
> A concurrent KVM_CREATE_VCPU can therefore increment created_vcpus
> after vgic_init() checks the counters, then block on config_lock before
> publishing the new vCPU. For a GICv4 VM, vgic_v4_init() consequently
> sizes its vPE array using a stale online_vcpus value, leaving no vPE
> entry for the new vCPU once its creation completes. The upcoming GICv5
> IRS support would hit the same issue when sizing its doorbell domain.
> 
> [...]

Applied to fixes, thanks!

[1/1] KVM: arm64: vgic: Serialise CTRL_INIT against vCPU creation
      commit: 5f54835d94db2e896ec27415b9de2e81cb56009a

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.





More information about the linux-arm-kernel mailing list