From 866a429848e8bca422a10712dae0711cbbdad99b Mon Sep 17 00:00:00 2001 From: sickcodes Date: Thu, 8 Jul 2021 23:32:26 +0000 Subject: [PATCH] Add CPUID_FLAGS to edit the CPUID flags on the fly. --- CHANGELOG.md | 1 + Dockerfile | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26c1b52..fe4a3fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ |Version|Date|Notes| |---|---|---| +| |2021-07-08|Add CPUID_FLAGS to edit the CPUID flags on the fly.| |4.4|2021-05-06|Prepare nakedvnc for hub.docker.com. Add `ENV BOOT_ARGS=` to supply additon boot arguments, for example, `vmx,rdtscp`. Add `ENV CPU=Penryn` to allow changes to the CPU emulation, for example, `Skylake-Client`, or see [more examples here](https://manpages.ubuntu.com/manpages/disco/man7/qemu-cpu-models.7.html).| | |2021-05-04|Disable arbitrary chown warning| | |2021-04-27|Fixed missing sudo| diff --git a/Dockerfile b/Dockerfile index fd8cedf..53f7b59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -219,7 +219,7 @@ RUN touch Launch.sh \ && tee -a Launch.sh <<< '[[ "${RAM}" = half ]] && export RAM="$(("$(head -n1 /proc/meminfo | tr -dc "[:digit:]") / 2000000"))"' \ && tee -a Launch.sh <<< 'sudo chown -R $(id -u):$(id -g) /dev/snd 2>/dev/null || true' \ && tee -a Launch.sh <<< 'exec qemu-system-x86_64 -m ${RAM:-2}000 \' \ - && tee -a Launch.sh <<< '-cpu ${CPU:-Penryn},vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check,${BOOT_ARGS} \' \ + && tee -a Launch.sh <<< '-cpu ${CPU:-Penryn},${CPUID_FLAGS:-vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check,}${BOOT_ARGS} \' \ && tee -a Launch.sh <<< '-machine q35,${KVM-"accel=kvm:tcg"} \' \ && tee -a Launch.sh <<< '-smp ${CPU_STRING:-${SMP:-4},cores=${CORES:-4}} \' \ && tee -a Launch.sh <<< '-usb -device usb-kbd -device usb-tablet \' \ @@ -263,11 +263,13 @@ ENV BOOT_ARGS= ENV BOOTDISK= -# edit the CPU that is beign emulated +# edit the CPU that is being emulated ENV CPU=Penryn +ENV CPUID_FLAGS='vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check,' ENV DISPLAY=:0.0 +# Deprecated ENV ENV=/env # Boolean for generating a bootdisk with new random serials.