feat: Display KVM warning on x64 CPU's (#78)
This commit is contained in:
parent
997bb53ab4
commit
7606acd228
1 changed files with 5 additions and 2 deletions
|
@ -8,7 +8,10 @@ set -Eeuo pipefail
|
||||||
: "${CPU_MODEL:=""}"
|
: "${CPU_MODEL:=""}"
|
||||||
: "${DEF_MODEL:="neoverse-n1"}"
|
: "${DEF_MODEL:="neoverse-n1"}"
|
||||||
|
|
||||||
[[ "${ARCH,,}" != "arm"* ]] && KVM="N"
|
if [[ "${ARCH,,}" != "arm64" ]]; then
|
||||||
|
KVM="N"
|
||||||
|
warn "your CPU architecture is ${ARCH} and cannot provide KVM acceleration for ARM64 instructions, this will cause a major loss of performance."
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$KVM" != [Nn]* ]]; then
|
if [[ "$KVM" != [Nn]* ]]; then
|
||||||
|
|
||||||
|
@ -54,7 +57,7 @@ else
|
||||||
KVM_OPTS=" -accel tcg,thread=multi"
|
KVM_OPTS=" -accel tcg,thread=multi"
|
||||||
|
|
||||||
if [ -z "$CPU_MODEL" ]; then
|
if [ -z "$CPU_MODEL" ]; then
|
||||||
if [[ "$ARCH" == "arm"* ]]; then
|
if [[ "${ARCH,,}" == "arm64" ]]; then
|
||||||
CPU_MODEL="max,pauth-impdef=on"
|
CPU_MODEL="max,pauth-impdef=on"
|
||||||
else
|
else
|
||||||
CPU_MODEL="$DEF_MODEL"
|
CPU_MODEL="$DEF_MODEL"
|
||||||
|
|
Loading…
Reference in a new issue