Skip to content

Commit e2b1132

Browse files
committed
qemu: fix conditional build on Xcode 26
Fixes #7579
1 parent 004f0aa commit e2b1132

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

patches/qemu-10.0.2-utm.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4012,10 +4012,10 @@ index 763201dd71..52c69ed9d5 100644
40124012
--
40134013
2.41.0
40144014

4015-
From cd66cbfb718d6d7790c1a2e7ad8533f51e27cf88 Mon Sep 17 00:00:00 2001
4015+
From 3f775e8c8540bf6193e5f97202602fe54433fc61 Mon Sep 17 00:00:00 2001
40164016
From: Joelle van Dyne <j@getutm.app>
40174017
Date: Fri, 19 Dec 2025 07:07:12 -0800
4018-
Subject: [PATCH 7/9] hvf: support changing IPA granule size
4018+
Subject: [PATCH] hvf: support changing IPA granule size
40194019

40204020
The IPA granule is the smallest page size hv_vm_map() support. For Venus, we
40214021
need to support 4KiB pages. macOS 26 introduces a public API for setting
@@ -4143,7 +4143,7 @@ index 52c69ed9d5..93e1b23e1a 100644
41434143
void hvf_arch_vcpu_destroy(CPUState *cpu);
41444144
int hvf_vcpu_exec(CPUState *);
41454145
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
4146-
index aa63f30fcf..1a0f69b496 100644
4146+
index aa63f30fcf..51da8009cb 100644
41474147
--- a/target/arm/hvf/hvf.c
41484148
+++ b/target/arm/hvf/hvf.c
41494149
@@ -12,6 +12,9 @@
@@ -4168,8 +4168,8 @@ index aa63f30fcf..1a0f69b496 100644
41684168
+ uint64_t page_size = qemu_real_host_page_size();
41694169
+
41704170
+ /* macOS 26 introduces a public API for setting granule size */
4171-
+#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && defined(MAC_OS_VERSION_26_0) && \
4172-
+ MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_26_0
4171+
+#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && defined(__MAC_26_0) && \
4172+
+ __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_26_0
41734173
+ if (__builtin_available(macOS 26, *)) {
41744174
+ hv_ipa_granule_t granule = HV_IPA_GRANULE_16KB;
41754175
+

0 commit comments

Comments
 (0)