Update proc.sh
This commit is contained in:
parent
36cd38da73
commit
edb1657bb1
1 changed files with 0 additions and 25 deletions
25
src/proc.sh
25
src/proc.sh
|
@ -24,31 +24,6 @@ if [[ "$CPU" == "Rockchip RK3588"* ]] && [[ "$CORES" == "8" ]]; then
|
||||||
[ -z "$CPU_PIN" ] && CPU_PIN="4,5,6,7"
|
[ -z "$CPU_PIN" ] && CPU_PIN="4,5,6,7"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MSRS="/sys/module/kvm/parameters/ignore_msrs"
|
|
||||||
if [ -e "$MSRS" ]; then
|
|
||||||
result=$(<"$MSRS")
|
|
||||||
if [[ "$result" == "0" ]] || [[ "${result^^}" == "N" ]]; then
|
|
||||||
echo 1 | tee "$MSRS" > /dev/null 2>&1 || true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
CLOCKSOURCE="tsc"
|
|
||||||
[[ "${ARCH,,}" == "arm64" ]] && CLOCKSOURCE="arch_sys_counter"
|
|
||||||
CLOCK="/sys/devices/system/clocksource/clocksource0/current_clocksource"
|
|
||||||
|
|
||||||
if [ ! -f "$CLOCK" ]; then
|
|
||||||
warn "file \"$CLOCK\" cannot not found?"
|
|
||||||
else
|
|
||||||
result=$(<"$CLOCK")
|
|
||||||
case "${result,,}" in
|
|
||||||
"${CLOCKSOURCE,,}" ) ;;
|
|
||||||
"kvm-clock" ) info "Nested KVM virtualization detected.." ;;
|
|
||||||
"hyperv_clocksource_tsc_page" ) info "Nested Hyper-V virtualization detected.." ;;
|
|
||||||
"hpet" ) warn "unsupported clock source detected: '$result'. Please set host clock source to '$CLOCKSOURCE'" ;;
|
|
||||||
*) warn "unexpected clock source detected: '$result'. Please set host clock source to '$CLOCKSOURCE'" ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${ARCH,,}" != "arm64" ]]; then
|
if [[ "${ARCH,,}" != "arm64" ]]; then
|
||||||
KVM="N"
|
KVM="N"
|
||||||
warn "your CPU architecture is ${ARCH^^} and cannot provide KVM acceleration for ARM64 instructions, this will cause a major loss of performance."
|
warn "your CPU architecture is ${ARCH^^} and cannot provide KVM acceleration for ARM64 instructions, this will cause a major loss of performance."
|
||||||
|
|
Loading…
Reference in a new issue