Skip to content

Commit

Permalink
improved macos fix
Browse files Browse the repository at this point in the history
Should also work on AMD RYZEN  but please re-test

Same lines as already Ryzen tested  but  further testing on older ryzen and notebooks would be a good idea

improves on quickemu-project#1116

hopefull solves any other issues from quickemu-project#1114
  • Loading branch information
TuxVinyards committed Apr 28, 2024
1 parent bacb037 commit e4b876c
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions quickemu
Original file line number Diff line number Diff line change
Expand Up @@ -523,23 +523,38 @@ function vm_boot() {
esac
;;
macos)
#https://www.nicksherlock.com/2020/06/installing-macos-big-sur-on-proxmox/
# https://www.nicksherlock.com/2020/04/installing-macos-catalina-on-proxmox-with-opencore/
# https://www.nicksherlock.com/2022/10/installing-macos-13-ventura-on-proxmox/
# Penryn https://github.com/search?q=repo%3Akholia%2FOSX-KVM%20%20GenuineIntel&type=code
# https://en.wikipedia.org/wiki/MacOS_version_history#Releases
# quickget current list: high-sierra mojave catalina big-sur monterey ventura sonoma
# A CPU with SSE4.1 support is required for >= macOS Sierra
# A CPU with SSE4.2 support is required for >= macOS Catalina
# A CPU with AVX2 support is required for >= macOS Ventura
case ${macos_release} in
ventura|sonoma)
if check_cpu_flag sse4_2 && check_cpu_flag avx2; then
# noTSX stops cpuid errors https://duckduckgo.com/?t=ffab&q=CPUID.07H%3AEBX.rtm+%5Bbit+11%5D&ia=web also cited by NickSherlock for Ventura install
CPU="-cpu Haswell-noTSX-IBRS,kvm=on,vendor=GenuineIntel,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc"
else
echo "ERROR! macOS ${macos_release} requires a CPU with SSE 4.1 and AVX2 support."
echo "ERROR! macOS ${macos_release} requires a CPU with SSE 4.2 and AVX2 support."
exit 1
fi
;;
*)
if check_cpu_flag sse4_1; then
catalina|big-sur|monterey)
if check_cpu_flag sse4_2; then
# Used in past versions: +movbe,+smep,+xgetbv1,+xsavec,+avx2
# Warn on AMD: +fma4,+pcid
CPU="-cpu Penryn,kvm=on,vendor=GenuineIntel,+aes,+avx,+bmi1,+bmi2,+fma,+hypervisor,+invtsc,+kvm_pv_eoi,+kvm_pv_unhalt,+popcnt,+ssse3,+sse4.2,vmware-cpuid-freq=on,+xsave,+xsaveopt,check"
else
echo "ERROR! macOS ${macos_release} requires a CPU with SSE 4.2 support."
exit 1
fi
;;
*)
if check_cpu_flag sse4_1; then
# as above but 4.1 (for older hosts)
CPU="-cpu Penryn,kvm=on,vendor=GenuineIntel,+aes,+avx,+bmi1,+bmi2,+fma,+hypervisor,+invtsc,+kvm_pv_eoi,+kvm_pv_unhalt,+popcnt,+ssse3,+sse4.1,vmware-cpuid-freq=on,+xsave,+xsaveopt,check"
else
echo "ERROR! macOS ${macos_release} requires a CPU with SSE 4.1 support."
exit 1
Expand Down

0 comments on commit e4b876c

Please sign in to comment.