From c01f7725a50e3d699abee717276ed17c42b0ef93 Mon Sep 17 00:00:00 2001
From: Jonathan Springer <jonpspri@gmail.com>
Date: Sun, 5 Sep 2021 08:32:52 -0400
Subject: TCG Accel fallback for Apple Silicon. Iss #10577

Cause qemu to fall back to using TCG acceleration when HVP acceleration
is not available on Darwin Aarch64.  Qemu prints a warning which it is
desirable to leave to embarrass the upstream Qemu into approving the HVF
patches.

[NO TESTS NEEDED]

Signed-off-by: Jonathan Springer <jspringer@us.ibm.com>
Signed-off-by: Jonathan Springer <jonpspri@gmail.com>
---
 pkg/machine/qemu/options_darwin_arm64.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pkg/machine/qemu/options_darwin_arm64.go b/pkg/machine/qemu/options_darwin_arm64.go
index 7513b3048..8c651584e 100644
--- a/pkg/machine/qemu/options_darwin_arm64.go
+++ b/pkg/machine/qemu/options_darwin_arm64.go
@@ -13,6 +13,7 @@ func (v *MachineVM) addArchOptions() []string {
 	ovmfDir := getOvmfDir(v.ImagePath, v.Name)
 	opts := []string{
 		"-accel", "hvf",
+		"-accel", "tcg",
 		"-cpu", "cortex-a57",
 		"-M", "virt,highmem=off",
 		"-drive", "file=/usr/local/share/qemu/edk2-aarch64-code.fd,if=pflash,format=raw,readonly=on",
-- 
cgit v1.2.3-54-g00ecf