Page MenuHomeFreeBSD

bhyve/arm64: Fix a race in PSCI CPU_ON
ClosedPublic

Authored by andrew on Aug 6 2025, 4:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 8, 7:46 AM
Unknown Object (File)
Tue, Jan 6, 3:38 PM
Unknown Object (File)
Mon, Jan 5, 6:17 PM
Unknown Object (File)
Fri, Jan 2, 11:45 AM
Unknown Object (File)
Tue, Dec 30, 1:02 AM
Unknown Object (File)
Dec 6 2025, 10:52 AM
Unknown Object (File)
Nov 29 2025, 2:31 AM
Unknown Object (File)
Nov 17 2025, 12:36 PM

Details

Summary

When multiple CPUs try to start the same CPU only one should return
success, the other CPUs should see either ON_PENDING or ALREADY_ON.
There was a race between checking if the CPU is on and marking it as
on in the running_cpumask CPU set.

Fix the race by using CPU_TEST_SET_ATOMIC to both check and set the
state in running_cpumask.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66024
Build 62907: arc lint + arc unit