Skip to content

Commit 858ec2c

Browse files
committed
Disable AVX-512 support for macOS Intel host
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 <[email protected]>
1 parent 9be3b9a commit 858ec2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/limayaml/defaults.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ func defaultCPUType() CPUType {
7373
if arch == X8664 && runtime.GOOS == "darwin" {
7474
switch cpuType[arch] {
7575
case "host", "max":
76+
// disable AVX-512, since it requires trapping instruction faults in guest
77+
// Enterprise Linux requires either v2 (SSE4) or v3 (AVX2), but not yet v4.
78+
cpuType[arch] += ",-avx512vl"
79+
7680
// Disable pdpe1gb on Intel Mac
7781
// https://github.com/lima-vm/lima/issues/1485
7882
// https://stackoverflow.com/a/72863744/5167443

0 commit comments

Comments
 (0)