Skip to content

Commit

Permalink
feat: improve compatibility of macOS on non-Intel host CPUs
Browse files Browse the repository at this point in the history
Adapted from #1114 (comment)

Tested full installs of Mojave, Catalina, Big Sur, Monterey, Ventura and Sonoma on AMD Ryzen 5950X. Performed updates post-install and installed Revolutionator.
  • Loading branch information
flexiondotorg committed May 17, 2024
1 parent 998c919 commit 4147f74
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions quickemu
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ function configure_cpu() {
CPU_MODEL="host"
CPU="-cpu ${CPU_MODEL},-pdpe1gb,+hypervisor"
else
CPU_MODEL="Haswell-v4"
CPU_MODEL="Haswell-v2"
CPU="-cpu ${CPU_MODEL},vendor=GenuineIntel,-pdpe1gb,+avx,+sse,+sse2,+sse3,vmware-cpuid-freq=on"
fi
# A CPU with fma is required for Metal support
Expand Down Expand Up @@ -411,9 +411,11 @@ function configure_cpu() {
esac

if [ "${HOST_CPU_VENDOR}" != "GenuineIntel" ] && [ -z "${HYPERVISOR}" ]; then
for FLAG in abm adx aes amd-ssbd bmi1 bmi2 cx8 eist f16c fma invtsc \
mmx movbe mpx popcnt smep vaes vbmi2 vpclmulqdq \
xgetbv1 xsave xsaveopt; do
for FLAG in abm adx aes amd-ssbd apic arat bmi1 bmi2 clflush cmov cx8 cx16 de \
eist erms f16c fma fp87 fsgsbase fxsr invpcid invtsc lahf_lm lm \
mca mce mmx movbe mpx msr mtrr nx pae pat pcid pge pse popcnt pse36 \
rdrand rdtscp sep smep syscall tsc tsc_adjust vaes vbmi2 vmx vpclmulqdq \
x2apic xgetbv1 xsave xsaveopt; do
if check_cpu_flag "${FLAG}"; then
CPU+=",+${FLAG}"
fi
Expand Down

0 comments on commit 4147f74

Please sign in to comment.