dev: add support for automatic hypervisor.framework usage on macOS

This commit is contained in:
alex committed 2025-10-21 05:40:22 -07:00
1 parent 22c8884f7e
commit 2aeb0474e6
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -41,3 +41,8 @@ if [ -z "${QEMU_ACCEL}" ] && [ "${TARGET_ARCH}" = "${HOST_ARCH}" ] &&
grep -E '^flags.*:.+ vmx .*' /proc/cpuinfo >/dev/null; then
QEMU_ACCEL="kvm"
fi
if [ "$(uname)" = "Darwin" ] && [ "${TARGET_ARCH}" = "${HOST_ARCH}" ] &&
[ "$(sysctl -n kern.hv_support 2>&1 || true)" = "1" ]; then
QEMU_ACCEL="hvf"
fi