fix(quickemu): enable vmware TSC and disable ACPI PCI hotplug for macOS
- Pass vmware-cpuid-freq=on to -cpu on Intel hosts to enable VMware TSC frequency reporting and improve macOS timing - Add ICH9-LPC flag to disable ACPI PCI hotplug bridge support to avoid macOS PCI hotplug issues (required for QEMU 6.1+) Signed-off-by: Martin Wimpress <martin@wimpress.org>
This commit is contained in:
parent
eb54549353
commit
2384b0d263
6
quickemu
6
quickemu
|
|
@ -608,9 +608,10 @@ function configure_cpu() {
|
||||||
# If the host has an Intel CPU, passes the host CPU model features, model, stepping, exactly to the guest.
|
# If the host has an Intel CPU, passes the host CPU model features, model, stepping, exactly to the guest.
|
||||||
# Disable huge pages (,-pdpe1gb) on macOS to prevent crashes
|
# Disable huge pages (,-pdpe1gb) on macOS to prevent crashes
|
||||||
# - https://stackoverflow.com/questions/60231203/qemu-qcow2-mmu-gva-to-gpa-crash-in-mac-os-x
|
# - https://stackoverflow.com/questions/60231203/qemu-qcow2-mmu-gva-to-gpa-crash-in-mac-os-x
|
||||||
|
# vmware-cpuid-freq=on enables VMware TSC frequency reporting for macOS timing
|
||||||
if [ "${HOST_CPU_VENDOR}" == "GenuineIntel" ] && [ -z "${HYPERVISOR}" ]; then
|
if [ "${HOST_CPU_VENDOR}" == "GenuineIntel" ] && [ -z "${HYPERVISOR}" ]; then
|
||||||
CPU_MODEL="host"
|
CPU_MODEL="host"
|
||||||
CPU="-cpu ${CPU_MODEL},-pdpe1gb,+hypervisor"
|
CPU="-cpu ${CPU_MODEL},-pdpe1gb,+hypervisor,vmware-cpuid-freq=on"
|
||||||
reset_cpu_flags
|
reset_cpu_flags
|
||||||
else
|
else
|
||||||
CPU_MODEL="Haswell-v2"
|
CPU_MODEL="Haswell-v2"
|
||||||
|
|
@ -678,7 +679,8 @@ function configure_cpu() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Disable S3 support in the VM to prevent macOS suspending during install
|
# Disable S3 support in the VM to prevent macOS suspending during install
|
||||||
GUEST_TWEAKS+=" -global ICH9-LPC.disable_s3=1 -device isa-applesmc,osk=$(echo "bheuneqjbexolgurfrjbeqfthneqrqcyrnfrqbagfgrny(p)NccyrPbzchgreVap" | tr 'A-Za-z' 'N-ZA-Mn-za-m')"
|
# Disable ACPI PCI hotplug to prevent issues with macOS (required for QEMU 6.1+)
|
||||||
|
GUEST_TWEAKS+=" -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -device isa-applesmc,osk=$(echo "bheuneqjbexolgurfrjbeqfthneqrqcyrnfrqbagfgrny(p)NccyrPbzchgreVap" | tr 'A-Za-z' 'N-ZA-Mn-za-m')"
|
||||||
|
|
||||||
# Disable High Precision Timer
|
# Disable High Precision Timer
|
||||||
if [ "${QEMU_VER_SHORT}" -ge 70 ]; then
|
if [ "${QEMU_VER_SHORT}" -ge 70 ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue