Loading src/proc.sh +17 −10 Original line number Diff line number Diff line Loading @@ -9,6 +9,23 @@ set -Eeuo pipefail : "${CPU_MODEL:=""}" : "${DEF_MODEL:="qemu64"}" 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,,}" != "amd64" ]]; then KVM="N" warn "your CPU architecture is ${ARCH^^} and cannot provide KVM acceleration for x64 instructions, this will cause a major loss of performance." Loading Loading @@ -60,16 +77,6 @@ if [[ "$KVM" != [Nn]* ]]; then CPU_FEATURES+=",migratable=no" fi CLOCK="/sys/devices/system/clocksource/clocksource0/current_clocksource" if [ -f "$CLOCK" ]; then result=$(<"$CLOCK") if [[ "${result,,}" != "tsc" ]]; then warn "unexpected clocksource: $result" fi else warn "file \"$CLOCK\" cannot not found?" fi if grep -qw "svm" <<< "$flags"; then # AMD processor Loading Loading
src/proc.sh +17 −10 Original line number Diff line number Diff line Loading @@ -9,6 +9,23 @@ set -Eeuo pipefail : "${CPU_MODEL:=""}" : "${DEF_MODEL:="qemu64"}" 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,,}" != "amd64" ]]; then KVM="N" warn "your CPU architecture is ${ARCH^^} and cannot provide KVM acceleration for x64 instructions, this will cause a major loss of performance." Loading Loading @@ -60,16 +77,6 @@ if [[ "$KVM" != [Nn]* ]]; then CPU_FEATURES+=",migratable=no" fi CLOCK="/sys/devices/system/clocksource/clocksource0/current_clocksource" if [ -f "$CLOCK" ]; then result=$(<"$CLOCK") if [[ "${result,,}" != "tsc" ]]; then warn "unexpected clocksource: $result" fi else warn "file \"$CLOCK\" cannot not found?" fi if grep -qw "svm" <<< "$flags"; then # AMD processor Loading