Skip to content

qemu: revert "Restrict pessimization of M4 arch to macOS 15.2"; upgrade Cortex-A72 to Cortex-A76 #3227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions pkg/limayaml/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var (

func defaultCPUType() CPUType {
cpuType := map[Arch]string{
AARCH64: "cortex-a72",
AARCH64: "cortex-a76", // available since QEMU 7.1 (Aug 2022)
ARMV7L: "cortex-a7",
// Since https://github.com/lima-vm/lima/pull/494, we use qemu64 cpu for better emulation of x86_64.
X8664: "qemu64",
Expand Down Expand Up @@ -1203,16 +1203,19 @@ func HasHostCPU() bool {
switch runtime.GOOS {
case "darwin":
if hasSMEDarwin() {
macOSProductVersion, err := osutil.ProductVersion()
if err != nil || (macOSProductVersion.Major == 15 && macOSProductVersion.Minor == 2) {
// SME is available since Apple M4 running macOS 15.2, but it was broken on macOS 15.2.
// It has been fixed in 15.3.
//
// https://github.com/lima-vm/lima/issues/3032
// https://gitlab.com/qemu-project/qemu/-/issues/2665
// https://gitlab.com/qemu-project/qemu/-/issues/2721
return false
}
// [2025-02-05]
// SME is available since Apple M4 running macOS 15.2, but it was broken on macOS 15.2.
// It has been fixed in 15.3.
//
// https://github.com/lima-vm/lima/issues/3032
// https://gitlab.com/qemu-project/qemu/-/issues/2665
// https://gitlab.com/qemu-project/qemu/-/issues/2721

// [2025-02-12]
// SME got broken again after upgrading QEMU from 9.2.0 to 9.2.1 (Homebrew bottle).
// Possibly this regression happened in some build process rather than in QEMU itself?
// https://github.com/lima-vm/lima/issues/3226
return false
}
return true
case "linux":
Expand Down
2 changes: 1 addition & 1 deletion templates/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ os: null
# Setting of instructions is supported like this: "qemu64,+ssse3".
# 🟢 Builtin default: hard-coded arch map with type (see the output of `limactl info | jq .defaultTemplate.cpuType`)
cpuType:
# aarch64: "cortex-a72" # (or "host" when running on aarch64 host)
# aarch64: "cortex-a76" # (or "host" when running on aarch64 host)
# armv7l: "cortex-a7" # (or "host" when running on armv7l host)
# riscv64: "rv64" # (or "host" when running on riscv64 host)
# x86_64: "qemu64" # (or "host,-pdpe1gb" when running on x86_64 host)
Expand Down
2 changes: 1 addition & 1 deletion website/content/en/docs/installation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Supported host OS:
- Windows (untested)

Prerequisite:
- QEMU 7.0 or later (Required, only if QEMU driver is used)
- QEMU 7.1 or later (Required, only if QEMU driver is used)

{{< tabpane text=true >}}

Expand Down
Loading