mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-09 20:04:20 +00:00
98b42fd75f
If a core is offline, we will not be able to set the cpu affinity to that core. The TSC calibration code attempts to determine the TSC offset of all cores. Determining which cores are online requires parsing the contents of /sys/devices/system/cpu/online on linux, and it's not clear how to do it on Windows. Instead, the calibration code will treat errors when calling set_cpu_affinity as legitimate reasons for a core to be offline, and will exclude that core from the offset information in the TscState. This will prevent the TSC sync mitigation logic from setting any vpu's affinity to that core. This also changes how number_of_logical_cores is implemented on linux, to count the number of configured cores instead of the number of online cores, which seems more correct. BUG=b:230372694 TEST=added a new unittest, also ran unittests with an offline core Change-Id: I12c187a7ca1dd06e25b396eaeae542628fdf563c Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764280 Tested-by: Colin Downs-Razouk <colindr@google.com> Commit-Queue: Colin Downs-Razouk <colindr@google.com> Reviewed-by: Dennis Kempin <denniskempin@google.com> |
||
---|---|---|
.. | ||
base_event_token_derive | ||
src | ||
.build_test_serial | ||
Cargo.toml |