From 858ec2c3c92268731d641e67779cbbf340c7d250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Fri, 27 Dec 2024 16:22:27 +0100 Subject: [PATCH] Disable AVX-512 support for macOS Intel host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Handling AVX-512 instructions requires promoting threads in the operating system, but it is not required by distros. So make do with the earlier microarchitectures (v2 and v3), without exposing all the host features of the newest (v4). Signed-off-by: Anders F Björklund --- pkg/limayaml/defaults.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/limayaml/defaults.go b/pkg/limayaml/defaults.go index c6740e06eef..88f680df544 100644 --- a/pkg/limayaml/defaults.go +++ b/pkg/limayaml/defaults.go @@ -73,6 +73,10 @@ func defaultCPUType() CPUType { if arch == X8664 && runtime.GOOS == "darwin" { switch cpuType[arch] { case "host", "max": + // disable AVX-512, since it requires trapping instruction faults in guest + // Enterprise Linux requires either v2 (SSE4) or v3 (AVX2), but not yet v4. + cpuType[arch] += ",-avx512vl" + // Disable pdpe1gb on Intel Mac // https://github.com/lima-vm/lima/issues/1485 // https://stackoverflow.com/a/72863744/5167443