From 206c83ab065f0296f032ea33a66fe2bb374125b3 Mon Sep 17 00:00:00 2001 From: Girish Date: Mon, 3 Jan 2022 01:17:33 +0530 Subject: [PATCH] disable hardware acceleration on darwin/arm64 arch (#1218) --- qemu/qemu_unix.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qemu/qemu_unix.go b/qemu/qemu_unix.go index c7ac45a9..e32fd561 100644 --- a/qemu/qemu_unix.go +++ b/qemu/qemu_unix.go @@ -1,3 +1,4 @@ +//go:build linux || darwin // +build linux darwin package qemu @@ -275,6 +276,11 @@ func (q *qemu) addAccel() (bool, error) { } if runtime.GOOS == "darwin" { + // currently Nanos dont support hardware acceleration in M1 Macbooks + if runtime.GOARCH == "arm64" { + return false, &errQemuHWAccelNotSupported{errCustom{"Hardware acceleration not supported", nil}} + } + if ok, _ := q.versionCompare(qemuVersion, hvfSupportedVersion); ok { q.addOption("-accel", "hvf") q.addOption("-cpu", "host,-rdtscp")