#
✕ nick:mmediouni[m]
#asahi-dev · 2026-07-31 21:24
mmediouni[m]now that even A13 has SPTM, wonder if a custom kernel build able to boot macOS without SPTM will be possible once there's the xnu source release...
#asahi-dev · 2026-07-31 21:20
mmediouni[m]It's good enough to cover the tracing part tbh so it does the job
#asahi-dev · 2026-07-31 21:15
mmediouni[m]And even then not consistently because all the transitions caused the scheduler to put the whole thing on the ecores...
#asahi-dev · 2026-07-31 21:14
mmediouni[m]And yeah it's very slow I was quite happy when with a qemu impl it was possible to get a "mount" command execution below a second
#asahi-dev · 2026-07-31 21:13
mmediouni[m]That's a nice result
#asahi-dev · 2026-07-31 16:35
mmediouni[m]but instead of using genter #0 to call SPTM, it does... hvc #0
#asahi-dev · 2026-07-31 16:34
mmediouni[m]it's its own SPTM client (like XNU is)
#asahi-dev · 2026-07-31 16:33
mmediouni[m]sven: look at /Library/Developer/CommandLineTools/SDKs/MacOSX27.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/platform/sptm
#asahi-dev · 2026-07-31 16:12
mmediouni[m]on non exclaves, micactivityd - which is also a conclave host - uses com.apple.private.audio.suppress-mic-indicator and I presume that on exclaves (am on an M4 Max so can't test this) that's not an option anymore
#asahi-dev · 2026-07-31 16:08
mmediouni[m]microphone indicator and always on stuff (hey Siri? - alwaysonexclavesd) apparently 🫠
#asahi-dev · 2026-07-31 16:02
mmediouni[m]seems to do pretty much nothing on M5 rn
#asahi-dev · 2026-07-31 16:01
mmediouni[m]the MacBook Neo has no hardware camera light
#asahi-dev · 2026-07-31 16:00
mmediouni[m] for now, defaults write "com.apple.coreanimation" CAEnableMedina -bool false disables the exclaves code path on M5+
#asahi-dev · 2026-07-31 15:58
mmediouni[m]well yeah you'll have to virtualise EL2 too... or just patch a tiny bit incl a few defaults write and then it stops looking
#asahi-dev · 2026-07-31 15:57
mmediouni[m](including M5 Pro/Max)
#asahi-dev · 2026-07-31 15:57
mmediouni[m]sven: so far on macOS 27: everything has SPTM, only A18 Pro and M5 get exclaves
#asahi-dev · 2026-07-31 08:28
mmediouni[m]maybe you want to try that one (which I didn't bother tracking down...)
#asahi-dev · 2026-07-31 08:28
mmediouni[m]sven: a hack in the QEMU emulation that is still there: not injecting any interrupts while the guest is running in GL
#asahi-dev · 2026-07-28 22:20
mmediouni[m]back when playing with it on qemu, the whole overhead of going all the way back to UM each time made it really expensive, happy you're getting better results here
#asahi-dev · 2026-07-28 22:14
mmediouni[m]It's not that much of a bad fit but yeah...
#asahi-dev · 2026-07-28 22:13
mmediouni[m]the sptm to xnu ABI is surprisingly very stable though
#asahi-dev · 2026-07-28 22:13
mmediouni[m]And non upstreamable
#asahi-dev · 2026-07-28 22:12
mmediouni[m]And making Linux work with libsptm sounds to be more pain than it's worth
#asahi-dev · 2026-07-28 22:10
mmediouni[m]so all this stuff really doesn't make much sense tbh
#asahi-dev · 2026-07-28 22:09
mmediouni[m]All you have to do is com.apple.private.hypervisor + raise ISA level to 4 + clear up the impdef trap bit in the 0 (hcr_el2) control field and then put whatever random stuff into the hacr control field
#asahi-dev · 2026-07-28 22:08
mmediouni[m]bad decisions abound, especially when SPRR + GXF are very much testable in VMs officially bc PCC vre
#asahi-dev · 2026-07-28 22:06
mmediouni[m][@chadmed:matrix.org](https://matrix.to/#/@chadmed:matrix.org) because apple has hw tso anyway, their lrcpc impl is slow and seems to outright alias to LDAR perf wise on quite some SoCs
#asahi-dev · 2026-07-28 22:05
mmediouni[m]that sounds Windows
#asahi-dev · 2026-07-28 22:01
mmediouni[m]I wonder how much testing apple even did in that lockdown mode
#asahi-dev · 2026-07-28 22:00
mmediouni[m][@_oftc_flokli:matrix.org](https://matrix.to/#/@_oftc_flokli:matrix.org) any more registers that are missing? And that are wanted?
#asahi-dev · 2026-07-28 19:52
mmediouni[m]I think effective value means TGE, so they punted this to impdef
#asahi-dev · 2026-07-28 19:51
mmediouni[m]> If HCR_EL2.TIDCP is 1, it is IMPLEMENTATION DEFINED whether any accesses from EL0 are trapped to EL2.
#asahi-dev · 2026-07-28 19:51
mmediouni[m]but then
#asahi-dev · 2026-07-28 19:51
mmediouni[m]> Otherwise, if FEAT_TIDCP1 is implemented and the Effective value of SCTLR_EL2.TIDCP is 1, any accesses from EL0 are trapped to EL2.
#asahi-dev · 2026-07-28 19:51
mmediouni[m]I think this might still work because HCR_EL2.TIDCP says
#asahi-dev · 2026-07-28 19:48
mmediouni[m]there's also this but I don't think that'd be leveragable on any apple hw
#asahi-dev · 2026-07-28 19:47
mmediouni[m]> elsif (EL2Enabled() && (!ELIsInHost(EL0))) && ((!IsHCRXEL2Enabled()) || (HCRX_EL2.EnIDCP128 == '0')) then
#asahi-dev · 2026-07-28 19:43
mmediouni[m]trapped by this mechanism
#asahi-dev · 2026-07-28 19:43
mmediouni[m]> If HCR_EL2.TGE==0, no instructions accessing the System register or System instruction spaces are
#asahi-dev · 2026-07-28 19:43
mmediouni[m]ah no...
#asahi-dev · 2026-07-28 19:42
mmediouni[m]sven: SCTLR_EL2.TIDCP
#asahi-dev · 2026-07-28 19:40
mmediouni[m]if I'm reading things right M4 already has FEAT_TIDCP1 (as it's armv9.3 and that's mandatory there)
#asahi-dev · 2026-07-28 19:28
mmediouni[m]yup looks like that worked :)
#asahi-dev · 2026-07-28 19:25
mmediouni[m]looks like that screenshot resulted in an instant ban sigh...
#asahi-dev · 2026-07-28 19:24
mmediouni[m]Uh oh but the IRC bridge still works...
#asahi-dev · 2026-07-28 19:24
mmediouni[m]> You were banned from Asahi Linux Development by Moderation
#asahi-dev · 2026-07-28 19:23
mmediouni[m]nickchan: huh this bridge is kinda broken, but that's the feature you're looking for - for having TIDCP regs trapped at EL0
#asahi-dev · 2026-07-28 19:22
mmediouni[m]uploaded an image: (101KiB) < https://matrix.org/oftc/media/v1/media/download/AR4TmSKJnyfd3wDZhLdCBP79mXw_1YynfonPkupcodmSW-h7AkBcrkdpLXT46SvImDILtehaCuwHqG6tm-e-eXlCef8kZ4AQAG1hdHJpeC5vcmcvYU5YUHBNQXJmY2F5Z3dMbHdzTm9vaGpi >