summaryrefslogtreecommitdiffstats
path: root/core/modules
diff options
context:
space:
mode:
authorSimon Rettberg2023-07-25 14:12:06 +0200
committerSimon Rettberg2023-07-25 14:12:06 +0200
commitec27f52f29760794a4db79ac474e823ea500ab93 (patch)
tree825f4a29ce37052bb6c5703517bfe1341f939907 /core/modules
parent[vmware-common] Polish xscreensaver ungrab hook a bit, avoid OfficeKey (diff)
downloadmltk-ec27f52f29760794a4db79ac474e823ea500ab93.tar.gz
mltk-ec27f52f29760794a4db79ac474e823ea500ab93.tar.xz
mltk-ec27f52f29760794a4db79ac474e823ea500ab93.zip
[qemu] Greatly simplify Alderlake workaround
Diffstat (limited to 'core/modules')
-rwxr-xr-xcore/modules/qemu/data/usr/bin/qemu-system-x86_64.openslx52
1 files changed, 1 insertions, 51 deletions
diff --git a/core/modules/qemu/data/usr/bin/qemu-system-x86_64.openslx b/core/modules/qemu/data/usr/bin/qemu-system-x86_64.openslx
index bc743f48..b5b19750 100755
--- a/core/modules/qemu/data/usr/bin/qemu-system-x86_64.openslx
+++ b/core/modules/qemu/data/usr/bin/qemu-system-x86_64.openslx
@@ -2,63 +2,13 @@
bin="${0%.openslx}"
-allflags="$( "$bin" -cpu help | sed -En '/^Recognized CPUID flags:/,/^$/s/ +/,+/gp' | tail -n+2 | tr -d '\n' )"
-
-replace_params () {
- modelname=
- model=
- family=
- stepping=
- vendor=
- for i; do
- shift
- case "$i" in
- migratable=*)
- continue
- ;;
- model=*)
- model=1
- ;;
- model-id=*)
- modelname=1
- ;;
- family=*)
- family=1
- ;;
- stepping=*)
- stepping=1
- ;;
- vendor=*)
- vendor=1
- ;;
- *)
- ;;
- esac
- set -- "$@" "$i"
- done
- [ -z "$modelname" ] && set -- "$@" "model-id=$( awk '/^model name\s/ {print substr($0,index($0, ":")+2); exit}' /proc/cpuinfo )"
- [ -z "$vendor" ] && set -- "$@" "vendor=$( awk '/^vendor_id\s/ {print substr($0,index($0, ":")+2); exit}' /proc/cpuinfo )"
- [ -z "$model" ] && set -- "$@" "model=$( awk '$1$2 == "model:" {print $3; exit}' /proc/cpuinfo )"
- [ -z "$family" ] && set -- "$@" "family=$( awk '$1$2$3 == "cpufamily:" {print $4; exit}' /proc/cpuinfo )"
- [ -z "$stepping" ] && set -- "$@" "stepping=$( awk '$1$2 == "stepping:" {print $3; exit}' /proc/cpuinfo )"
- printf "%s" "$*"
-}
-
i="$#"
while [ "$i" -gt 0 ]; do
case "$1" in
-cpu)
case "$2" in
- host|max)
- set -- "$@" -cpu "Cascadelake-Server$allflags"
- : "$(( i -= 2 ))"
- shift 2
- continue
- ;;
host*|max*)
- params="${2#*,}"
- params="$( set -f ; IFS=, ; replace_params $params )"
- set -- "$@" -cpu "Cascadelake-Server,$params$allflags"
+ set -- "$@" -cpu "$2,host-phys-bits=off"
: "$(( i -= 2 ))"
shift 2
continue