-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
qemu: apply hvf: arm: disable SME which is not properly handled by QEMU
#201613
Open
AkihiroSuda
wants to merge
1
commit into
Homebrew:master
Choose a base branch
from
AkihiroSuda:qemu
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+38
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ class Qemu < Formula | |
url "https://download.qemu.org/qemu-9.2.0.tar.xz" | ||
sha256 "f859f0bc65e1f533d040bbe8c92bcfecee5af2c921a6687c652fb44d089bd894" | ||
license "GPL-2.0-only" | ||
revision 1 | ||
head "https://gitlab.com/qemu-project/qemu.git", branch: "master" | ||
|
||
livecheck do | ||
|
@@ -62,6 +63,13 @@ class Qemu < Formula | |
depends_on "systemd" | ||
end | ||
|
||
# hvf: arm: disable SME which is not properly handled by QEMU | ||
# From https://github.com/utmapp/UTM/blob/v4.6.3/patches/qemu-9.1.2-utm.patch#L714-L741 | ||
# Needed by macOS 15.2 (or later) on Apple M4 (or later) | ||
# https://gitlab.com/qemu-project/qemu/-/issues/2665 | ||
# https://gitlab.com/qemu-project/qemu/-/issues/2721 | ||
patch :DATA | ||
|
||
def install | ||
ENV["LIBTOOL"] = "glibtool" | ||
|
||
|
@@ -127,3 +135,33 @@ def install | |
end | ||
end | ||
end | ||
|
||
__END__ | ||
From 60b68022e834efcb7ae72154ab5536a2b6b0c099 Mon Sep 17 00:00:00 2001 | ||
From: osy <[email protected]> | ||
Date: Tue, 26 Nov 2024 13:25:01 -0800 | ||
Subject: [PATCH 4/4] DO NOT MERGE: hvf: arm: disable SME which is not properly | ||
handled by QEMU | ||
|
||
--- | ||
target/arm/hvf/hvf.c | 5 +++++ | ||
1 file changed, 5 insertions(+) | ||
|
||
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c | ||
index b315b392ee..a63a7763a0 100644 | ||
--- a/target/arm/hvf/hvf.c | ||
+++ b/target/arm/hvf/hvf.c | ||
@@ -910,6 +910,11 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) | ||
clamp_id_aa64mmfr0_parange_to_ipa_size(&host_isar.id_aa64mmfr0); | ||
#endif | ||
|
||
+ /* | ||
+ * Disable SME which is not properly handled by QEMU yet | ||
+ */ | ||
+ host_isar.id_aa64pfr1 &= ~R_ID_AA64PFR1_SME_MASK; | ||
+ | ||
ahcf->isar = host_isar; | ||
|
||
/* | ||
-- | ||
2.41.0 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not use the upstream patch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which patch?