mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-07 17:07:58 +08:00
feat: Verify clocksource is TSC
This commit is contained in:
parent
2ece865417
commit
010a709365
10
src/proc.sh
10
src/proc.sh
@ -51,6 +51,7 @@ fi
|
||||
if [[ "$KVM" != [Nn]* ]]; then
|
||||
|
||||
CPU_FEATURES="kvm=on,l3-cache=on,+hypervisor"
|
||||
CLOCK="/sys/devices/system/clocksource/clocksource0/current_clocksource"
|
||||
KVM_OPTS=",accel=kvm -enable-kvm -global kvm-pit.lost_tick_policy=discard"
|
||||
|
||||
if ! grep -qw "sse4_2" <<< "$flags"; then
|
||||
@ -64,6 +65,15 @@ if [[ "$KVM" != [Nn]* ]]; then
|
||||
CPU_FEATURES+=",migratable=no"
|
||||
fi
|
||||
|
||||
if [ -f "$CLOCK" ]; then
|
||||
CLOCK=$(<"$CLOCK")
|
||||
if [[ "${CLOCK,,}" != "tsc" ]]; then
|
||||
warn "unexpected clocksource: $CLOCK"
|
||||
fi
|
||||
else
|
||||
warn "file \"$CLOCK\" cannot not found?"
|
||||
fi
|
||||
|
||||
if grep -qw "svm" <<< "$flags"; then
|
||||
|
||||
# AMD processor
|
||||
|
Loading…
x
Reference in New Issue
Block a user