Skip to content

Commit

Permalink
Disable AVX-512 support for macOS Intel host
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
afbjorklund committed Dec 27, 2024
1 parent 9be3b9a commit 858ec2c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/limayaml/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 858ec2c

Please sign in to comment.