Skip to content

Commit

Permalink
disable hardware acceleration on darwin/arm64 arch (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
girishramnani authored Jan 2, 2022
1 parent 3f7e17e commit 206c83a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions qemu/qemu_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux || darwin
// +build linux darwin

package qemu
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 206c83a

Please sign in to comment.