mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-07 17:07:58 +08:00
feat: Support invariant TSC
This commit is contained in:
parent
2b777e1403
commit
7f1e0aadce
20
src/proc.sh
20
src/proc.sh
@ -64,6 +64,26 @@ if [[ "$KVM" != [Nn]* ]]; then
|
||||
CPU_FEATURES="$CPU_FEATURES,migratable=no"
|
||||
fi
|
||||
|
||||
if grep -qw "svm" <<< "$flags"; then
|
||||
|
||||
# AMD processor
|
||||
|
||||
if grep -qw "tsc_scale" <<< "$flags"; then
|
||||
CPU_FEATURES="$CPU_FEATURES,+invtsc"
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
# Intel processor
|
||||
|
||||
vmx=$(sed -ne '/^vmx flags/s/^.*: //p' /proc/cpuinfo)
|
||||
|
||||
if grep -qw "tsc_scaling" <<< "$vmx"; then
|
||||
CPU_FEATURES="$CPU_FEATURES,+invtsc"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
KVM_OPTS=""
|
||||
|
Loading…
x
Reference in New Issue
Block a user