From aad831766cb71bb9e1ec7adffd5e1b461f18cc9a Mon Sep 17 00:00:00 2001 From: Wildan Mubarok Date: Sat, 16 Aug 2025 13:36:12 +0000 Subject: [PATCH] Use HVF Acceleration by default for MacOS Silicon --- mk/qemu.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mk/qemu.mk b/mk/qemu.mk index 1bfa5d40..88611c87 100644 --- a/mk/qemu.mk +++ b/mk/qemu.mk @@ -80,6 +80,11 @@ else ifeq ($(ARCH),aarch64) QEMUFLAGS+=-device qemu-xhci -device usb-kbd -device usb-tablet endif endif + + # Default to using HVF when host is MacOS Silicon + ifeq ($(HOST_ARCH),arm64) + kvm?=yes + endif else ifeq ($(ARCH),riscv64gc) live=no efi=yes @@ -243,7 +248,11 @@ ifeq ($(UNAME),Linux) endif ifeq ($(UNAME),Darwin) - QEMUFLAGS+=-cpu $(QEMU_CPU) + ifneq ($(kvm),no) + QEMUFLAGS+=-accel hvf -cpu max + else + QEMUFLAGS+=-cpu $(QEMU_CPU) + endif endif ifneq ($(PFLASH0),)