summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorSascha Bischoff <Sascha.Bischoff@arm.com>2026-09-04 17:44:20 +0000
committerMarc Zyngier <maz@kernel.org>2026-11-03 10:58:51 +0000
commit5f54835d94db2e896ec27415b9de2e81cb56009a (patch)
treee62d7cbe25cbd77fabe0c1ca9f96bc2e9a9f8306 /tools/perf/scripts/python/bin/stackcollapse-report
parent1ad8b8b8827e72b7d5907ee47c43ca0e2506b4f5 (diff)
KVM: arm64: vgic: Serialise CTRL_INIT against vCPU creation
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. Hold kvm->lock around CTRL_INIT. The existing counter check detects a vCPU creation already in progress, while the lock prevents a new one from starting until initialisation has completed. Fixes: f00327731131 ("KVM: arm64: Use config_lock to protect vgic state") Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://lore.kernel.org/r/20260807124506.ED85C1F000E9@smtp.kernel.org Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com> Reviewed-by: Fuad Tabba <fuad.tabba@linux.dev> Tested-by: Fuad Tabba <fuad.tabba@linux.dev> Link: https://patch.msgid.link/20260904174419.76057-1-sascha.bischoff@arm.com Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions