From 8716ac0c8da6d39536faafa0827bebe41e78f6a6 Mon Sep 17 00:00:00 2001 From: Raghavendra Talur Date: Fri, 8 Sep 2023 06:40:00 -0400 Subject: [PATCH] qemu: set the cpu type to max RHEL9 and therefore the dependent distributions and base containers have a minimum microarchitechture level of x86-64-v2.[1] The default cpu level of the qemu driver on an Intel Mac is x86-64-v1 even if the host cpu has the x86-64-v2 capability. Using the cpu type of max allows qemu to use all the host cpu capabilities that is also supported by the hypervisor framework.[2] This was fixed for linux host by changing the default within qemu but it wasn't changed for MacOS. [1] https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level [2] https://gitlab.com/qemu-project/qemu/-/issues/1686#note_1417714887 [3] https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg04066.html Signed-off-by: Raghavendra Talur --- pkg/minikube/registry/drvs/qemu2/qemu2.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/registry/drvs/qemu2/qemu2.go b/pkg/minikube/registry/drvs/qemu2/qemu2.go index 2fb43a8e5325..c23765b18893 100644 --- a/pkg/minikube/registry/drvs/qemu2/qemu2.go +++ b/pkg/minikube/registry/drvs/qemu2/qemu2.go @@ -125,7 +125,9 @@ func configure(cc config.ClusterConfig, n config.Node) (interface{}, error) { switch runtime.GOARCH { case "amd64": qemuMachine = "" // default - qemuCPU = "" // default + // set cpu type to max to enable higher microarchitecture levels + // see https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg04066.html for details + qemuCPU = "max" case "arm64": qemuMachine = "virt" qemuCPU = "cortex-a72"