mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 05:20:02 +08:00
feat: Improve CPU detection (#854)
This commit is contained in:
parent
d00fe4b3eb
commit
ff3744ead9
12
src/proc.sh
12
src/proc.sh
@ -34,15 +34,11 @@ if [[ "$KVM" != [Nn]* ]]; then
|
|||||||
if [ -n "$KVM_ERR" ]; then
|
if [ -n "$KVM_ERR" ]; then
|
||||||
KVM="N"
|
KVM="N"
|
||||||
if [[ "$OSTYPE" =~ ^darwin ]]; then
|
if [[ "$OSTYPE" =~ ^darwin ]]; then
|
||||||
warn "you are using MacOS which has no KVM support, this will cause a major loss of performance."
|
warn "you are using macOS which has no KVM support, this will cause a major loss of performance."
|
||||||
else
|
else
|
||||||
if grep -qi Microsoft /proc/version; then
|
error "KVM acceleration not available $KVM_ERR, this will cause a major loss of performance."
|
||||||
warn "you are using Windows 10 which has no KVM support, this will cause a major loss of performance."
|
error "See the FAQ on how to diagnose the cause, or continue without KVM by setting KVM=N (not recommended)."
|
||||||
else
|
[[ "$DEBUG" != [Yy1]* ]] && exit 88
|
||||||
error "KVM acceleration not available $KVM_ERR, this will cause a major loss of performance."
|
|
||||||
error "See the FAQ on how to diagnose the cause, or continue without KVM by setting KVM=N (not recommended)."
|
|
||||||
[[ "$DEBUG" != [Yy1]* ]] && exit 88
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ CPU="${CPU// CPU/}"
|
|||||||
CPU="${CPU// 16 Core/}"
|
CPU="${CPU// 16 Core/}"
|
||||||
CPU="${CPU// Processor/}"
|
CPU="${CPU// Processor/}"
|
||||||
CPU="${CPU// Quad core/}"
|
CPU="${CPU// Quad core/}"
|
||||||
|
CPU="${CPU// Core TM/ Core}"
|
||||||
CPU="${CPU// with Radeon Graphics/}"
|
CPU="${CPU// with Radeon Graphics/}"
|
||||||
[ -z "${CPU// /}" ] && CPU="Unknown"
|
[ -z "${CPU// /}" ] && CPU="Unknown"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user