#
…

2026-07-28

00:05hdbngr has quit [Ping timeout: 480 seconds]
00:22jole_ has joined #asahi-dev
00:30pb17 has quit [Ping timeout: 480 seconds]
00:34hdbngr has joined #asahi-dev
00:34pb17 has joined #asahi-dev
00:43hdbngr has quit [Ping timeout: 480 seconds]
00:52lion328 has joined #asahi-dev
00:57vulpes25 has joined #asahi-dev
01:02vulpes2 has quit [Ping timeout: 480 seconds]
01:02vulpes25 is now known as vulpes2
01:21jsk has quit [Read error: No route to host]
01:22jsk has joined #asahi-dev
01:32voidah has joined #asahi-dev
02:00yurix has quit [Remote host closed the connection]
02:00yurix has joined #asahi-dev
02:02hdbngr has joined #asahi-dev
02:11voidah has quit [Ping timeout: 480 seconds]
02:11hdbngr has quit [Ping timeout: 480 seconds]
02:16voidah has joined #asahi-dev
02:40hdbngr has joined #asahi-dev
02:54hdbngr has quit [Ping timeout: 480 seconds]
03:00hdbngr has joined #asahi-dev
03:09hdbngr has quit [Ping timeout: 480 seconds]
03:12jryoo has joined #asahi-dev
03:12jryoo has quit [Remote host closed the connection]
03:14nora_ has joined #asahi-dev
03:16nora has quit [Ping timeout: 480 seconds]
03:23mripard has quit [Remote host closed the connection]
03:24mripard has joined #asahi-dev
03:44hdbngr has joined #asahi-dev
03:53hdbngr has quit [Ping timeout: 480 seconds]
03:59hdbngr has joined #asahi-dev
04:06marvin24 has quit [Ping timeout: 480 seconds]
04:08ddxtanx_ has quit [Remote host closed the connection]
04:16hdbngr has quit [Ping timeout: 480 seconds]
04:21hdbngr has joined #asahi-dev
04:30hdbngr has quit [Ping timeout: 480 seconds]
04:34pb17 has quit [Ping timeout: 480 seconds]
04:37hdbngr has joined #asahi-dev
04:41pb17 has joined #asahi-dev
04:48hdbngr has quit [Ping timeout: 480 seconds]
05:00hdbngr has joined #asahi-dev
05:03voidah has quit [Ping timeout: 480 seconds]
05:21hdbngr has quit [Ping timeout: 480 seconds]
05:22hdbngr has joined #asahi-dev
05:31hdbngr has quit [Ping timeout: 480 seconds]
05:37hdbngr has joined #asahi-dev
05:43jackhumphries has quit [Ping timeout: 480 seconds]
05:50hdbngr has quit [Ping timeout: 480 seconds]
05:54hdbngr has joined #asahi-dev
06:07mildsunrise has quit [Quit: disconnect]
06:07mildsunrise has joined #asahi-dev
06:09hdbngr has quit [Ping timeout: 480 seconds]
06:27tbodt has joined #asahi-dev
06:33hdbngr has joined #asahi-dev
06:37vup has quit []
06:39vup has joined #asahi-dev
07:06hardy94 has joined #asahi-dev
07:19hdbngr has quit [Ping timeout: 480 seconds]
07:23svenpity, aprr_jit=0 disables the userspace JIT stuff but safari then somehow does millions of genter/exit calls so that it doesn't start anyway :(
07:37hdbngr has joined #asahi-dev
07:41Carlos has quit [Ping timeout: 480 seconds]
07:41Carlos has joined #asahi-dev
08:08kloenk has joined #asahi-dev
08:14hdbngr has quit [Ping timeout: 480 seconds]
08:20sofusyes! i think i got all 9166 bytes nailed down! https://pastebin.com/30rL1fAV
08:22sofusfilling out this struct is 4675 loc :)
08:23JamesCalligeros[m]Does that need to be pushed for every damn frame
08:24JamesCalligeros[m]And i thought dcp’s 7-ish kib swap request was bad
08:24sofusim very happy i could mostly copy from drivers/media/platform/verisilicon/rockchip_av1_entropymode.c
08:26sofusbut all tests still fail, so im afraid there is more somewhere else
08:27sofusbut at least the output has color now :p
08:29hdbngr has joined #asahi-dev
08:30sofusfilling out the struct is not actually 4000 loc, the 4000 loc are the static values and filling
08:42pb17 has quit [Remote host closed the connection]
08:43pb17 has joined #asahi-dev
08:46NickChan[m]sven: if there's no jit fast switching then i think it does jit by changing pagetable since rwx don't exist under sprr
08:46NickChan[m]and changing pagetable requires sptm
08:46svenyeah, that's obviously what happens
08:47NickChan[m](using the same physical memory but mapped rx in one location rw in another could also work, but safari does not do that)
08:47sveni could probably hack this by just mapping the pages as rwx but meh.. this will be good enough for tracing
08:48NickChan[m]I do not know if TIDCP traps the EL0 registers on apple silicon
08:48NickChan[m]arm specification says it is implementation defined for each encoding
08:49sveni can only trap that register up to EL1 but not to EL2. i'd just patch libsystem_pthread or whatever at that point
08:50svenor see if i can mess with the commpage in some way to make it think it has userspace sprr but then not actually try to mrs/msr
08:52ids1024 has quit [Ping timeout: 480 seconds]
08:54NickChan[m]so the problem is you can't make it think the machine is a VMAPPLE because then it would try to make rwx mappings that won't work if you are virtualizing SPTM and SPRR
08:54NickChan[m]And if you make it think it has full SPRR then it would try to use the EL0 switching registers which can't easily be trapped
08:55sveni'd just patch the library and make it do what i want
08:56svenit's just not important though
08:56svenwe don't need this to work for tracing, would've just been fun
09:00hdbngr has quit [Ping timeout: 480 seconds]
09:12hdbngr has joined #asahi-dev
09:25hdbngr has quit [Ping timeout: 480 seconds]
09:44hdbngr has joined #asahi-dev
09:58voidah has joined #asahi-dev
10:06hdbngr has quit [Ping timeout: 480 seconds]
10:08voidah has quit [Ping timeout: 480 seconds]
10:08hdbngr has joined #asahi-dev
10:17voidah has joined #asahi-dev
10:25voidah has quit [Ping timeout: 480 seconds]
10:45hdbngr has quit [Ping timeout: 480 seconds]
10:58hdbngr has joined #asahi-dev
11:02Ardu0us_ has joined #asahi-dev
11:06hdbngr has quit [Ping timeout: 480 seconds]
11:06Ardu0us has quit [Ping timeout: 480 seconds]
11:26hdbngr has joined #asahi-dev
11:36hdbngr has quit [Ping timeout: 480 seconds]
11:39hdbngr has joined #asahi-dev
12:03zumi has quit [Remote host closed the connection]
12:19voidah has joined #asahi-dev
12:27voidah has quit [Ping timeout: 480 seconds]
12:28zumi has joined #asahi-dev
12:45hdbngr has quit [Ping timeout: 480 seconds]
12:45voidah has joined #asahi-dev
12:49hdbngr has joined #asahi-dev
12:56voidah has quit [Ping timeout: 480 seconds]
12:59hdbngr has quit [Ping timeout: 480 seconds]
13:02voidah has joined #asahi-dev
13:13voidah has quit [Ping timeout: 480 seconds]
13:21marvin24 has joined #asahi-dev
13:24hdbngr has joined #asahi-dev
13:31pb17 has quit [Ping timeout: 480 seconds]
13:32hdbngr has quit [Ping timeout: 480 seconds]
13:33pb17 has joined #asahi-dev
13:38voidah has joined #asahi-dev
13:39voidah has quit [Read error: Connection reset by peer]
13:41hdbngr has joined #asahi-dev
13:59nnym_ has quit [Ping timeout: 480 seconds]
14:01nnym has joined #asahi-dev
14:01voidah has joined #asahi-dev
14:11nickchansven: have you seen RTKit management message > 0xf ? linux says it is bit [59:52] but i believe it is bit [55:52]
14:12nickchanmanagement message type
14:12nickchanthe list in linux only goes up to 0xb so it would fit within 4 bits
14:13nickchanand the reason is the top 8 bits of the mailbox message is used for endpoint on 64 bit mailboxes and there are such device still supported in latest
14:13nickchansome homepod and apple tv
14:18nickchani sure hope these devices get removed next year because somehow the a8 homepod survives into version 27
14:22svenno idea, those bits might've just been a guess because the next field starts at 60
14:23voidah has quit [Read error: Connection reset by peer]
14:23ninjamar has joined #asahi-dev
14:23ninjamar has quit []
14:25nickchannone of the fields actually starts at 60
14:25nickchanit seems the upper 8 bits did get reused in the OSLOG endpoint though, and that starts at 56
14:25svenhmhm.. no idea where that mask comes from then
14:27hdbngr has quit [Ping timeout: 480 seconds]
14:28nickchanthe thing that starts at bit 52 is also used as a message type within that endpoint for syslog, crashlog, and ioreport and none of them exceed 0xf
14:28nickchanso im fully convinced that really is supposed to be 4 bit wide
14:29nickchanand the oslog that does reuse the top 8 bits don't follow this convention, APPLE_RTKIT_OSLOG_SIZE is bit 55:36 so it is irrelvant
14:32nickchanin any case, 14 commits later i finally did all the prerequesites at least I think so time to lock in on that disk driver
14:33voidah has joined #asahi-dev
14:34hdbngr has joined #asahi-dev
14:35chaos_princessi think our oslog code is just wrong
14:53voidah has quit [Read error: Connection reset by peer]
14:53halloy7400 has joined #asahi-dev
15:04voidah has joined #asahi-dev
15:12ralim8 has quit [Read error: Connection reset by peer]
15:12ralim8 has joined #asahi-dev
15:26lord_breadcrumb has joined #asahi-dev
15:26lord_breadcrumb has quit [Remote host closed the connection]
15:55hdbngr has quit [Ping timeout: 480 seconds]
16:03hdbngr has joined #asahi-dev
16:10voidah has quit [Read error: Connection reset by peer]
16:14pb17 has quit [Ping timeout: 480 seconds]
16:15ansg191_ has joined #asahi-dev
16:15ansg191 has quit [Ping timeout: 480 seconds]
16:15pb17 has joined #asahi-dev
16:15ansg191_ is now known as ansg191
16:16halloy7400 has quit [Ping timeout: 480 seconds]
16:16hdbngr has quit [Ping timeout: 480 seconds]
16:19hdbngr has joined #asahi-dev
16:22ansg191_ has joined #asahi-dev
16:28hdbngr has quit [Ping timeout: 480 seconds]
16:36hdbngr has joined #asahi-dev
16:51hdbngr has quit [Ping timeout: 480 seconds]
16:59hdbngr has joined #asahi-dev
17:14ansg191_ has quit [Ping timeout: 480 seconds]
17:24hdbngr has quit [Ping timeout: 480 seconds]
17:31hdbngr has joined #asahi-dev
17:39ansg191_ has joined #asahi-dev
17:40hdbngr has quit [Ping timeout: 480 seconds]
17:41hdbngr has joined #asahi-dev
17:47ansg191_ has quit [Ping timeout: 480 seconds]
17:49hdbngr has quit [Ping timeout: 480 seconds]
17:50hdbngr has joined #asahi-dev
18:05hdbngr has quit [Remote host closed the connection]
18:05hdbngr has joined #asahi-dev
18:13svennext up: time to get a M4 and see what SPTM/TXM needs additionally
18:15fossdd has quit [Remote host closed the connection]
18:15fossdd has joined #asahi-dev
18:21hdbngr has quit [Ping timeout: 480 seconds]
18:24hdbngr has joined #asahi-dev
18:25yukais remote access to one helpful to get started?
18:28fl0_idis there a simpler way now to get working HV macos on m3? or is the guide by integralpilot still current?
18:28yukaiirc 1/3 of the manual patches are still required
18:29fl0_idoki. right I read sth about that...
18:29fl0_idwill check logs
18:30yukarecount_base is still required, but init_base and config_base are now integrated into m1n1
18:34yukaah yes that should work as well
18:34yukaI think it's just not upstreamable because of the offset is hardcoded and might change
18:35fl0_idsofus ah thanks, right i remember jannau said they had a local patch for it
18:35fl0_idshould make this much better
18:47hdbngr has quit [Remote host closed the connection]
18:47hdbngr has joined #asahi-dev
19:01svenyuka: probably won't have time to continue before the weekend and there's at least one GL0 inaccuracy i need to fix anyway
19:01svenand i can probably get started with sptm on my m1.
19:01sventhanks for the offer, but i think there's enough stuff i can make progress on before that thing arrives
19:21mmediouni[m] has joined #asahi-dev
19:22mmediouni[m] has left #asahi-dev [Kicked by @draupnir-fedora:rory.gay : spam]
19:23mmediouni[m] has joined #asahi-dev
19:23mmediouni[m]nickchan: huh this bridge is kinda broken, but that's the feature you're looking for - for having TIDCP regs trapped at EL0
19:24mmediouni[m]> You were banned from Asahi Linux Development by Moderation
19:24mmediouni[m]Uh oh but the IRC bridge still works...
19:25mmediouni[m]looks like that screenshot resulted in an instant ban sigh...
19:26svenprobably over-eager anti-spam protection
19:26mmediouni[m] has left #asahi-dev [Kicked by @svenpeter:matrix.org ]
19:27sventhat was supposed to unban him *sigh*
19:27mmediouni[m] has joined #asahi-dev
19:27svenyou should no longer be banned now
19:28sventhere's some weirdness with the bridge
19:28mmediouni[m]yup looks like that worked :)
19:30fossdd has quit [Remote host closed the connection]
19:31fossdd has joined #asahi-dev
19:34hdbngr has quit [Ping timeout: 480 seconds]
19:40mmediouni[m]if I'm reading things right M4 already has FEAT_TIDCP1 (as it's armv9.3 and that's mandatory there)
19:40svenso does that trap from el0 all the way up to el2 even with el1 inbetween?
19:41hardy94 has quit [Remote host closed the connection]
19:42hardy94 has joined #asahi-dev
19:42mmediouni[m]sven: SCTLR_EL2.TIDCP
19:43mmediouni[m]> If HCR_EL2.TGE==0, no instructions accessing the System register or System instruction spaces are
19:43mmediouni[m]trapped by this mechanism
19:47mmediouni[m]> elsif (EL2Enabled() && (!ELIsInHost(EL0))) && ((!IsHCRXEL2Enabled()) || (HCRX_EL2.EnIDCP128 == '0')) then
19:48mmediouni[m]there's also this but I don't think that'd be leveragable on any apple hw
19:49sveni think if we really need userspace jit to work for some reason i'll just patch the msr/mrs in that .dylib to a nop and map that sprr index as rwx
19:51mmediouni[m]I think this might still work because HCR_EL2.TIDCP says
19:51mmediouni[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.
19:51svenworth a try i guess
19:51mmediouni[m]> If HCR_EL2.TIDCP is 1, it is IMPLEMENTATION DEFINED whether any accesses from EL0 are trapped to EL2.
19:52mmediouni[m]I think effective value means TGE, so they punted this to impdef
19:53j`eyeffective value means that a a bit should be treated as 1, even if it wasnt set
19:54hdbngr has joined #asahi-dev
19:54j`ey(some feature might say, feature X says that some_bit is treated as 1)
20:15pb17 has quit [Remote host closed the connection]
20:19pb17 has joined #asahi-dev
21:31hdbngr has quit [Ping timeout: 480 seconds]
21:47floklit6040 has a working `msr((3, 5, 15, 1, 3), mrs((3, 5, 15, 1, 3)))` on 26.6!
21:48yukaso 26.6 has it unlocked on all M4* :)
21:59hdbngr has joined #asahi-dev
22:00mmediouni[m][@_oftc_flokli:matrix.org](https://matrix.to/#/@_oftc_flokli:matrix.org) any more registers that are missing? And that are wanted?
22:01mmediouni[m]I wonder how much testing apple even did in that lockdown mode
22:02JamesCalligeros[m]We do their testing for them :)
22:02yuka> And that are wanted?
22:03sventhe core power off ones might be nice but we don’t even know how to correctly use them so kinda hard to ask for them
22:03svenTSO as well but I’ve heard that disabling that was very intentional
22:05mmediouni[m]that sounds Windows
22:05JamesCalligeros[m]If we get lrcpc on machines where it’s supported i dont think tso matters that much
22:05svenl2c_err thingy to be able to clear it
22:05chaos_princessmmediouni[m]: yep, exactly what that is for
22:05JamesCalligeros[m]tbqh get a pc if you wanna game competitively
22:05svenand if I could get a wish granted SPRR/gxf but well… :-D
22:05chaos_princessnot what its for
22:06mmediouni[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
22:06JamesCalligeros[m]Yeah no i understand all that
22:07JamesCalligeros[m]I just dont think its the end of the world if we dont get it back
22:07svenyeah, I don’t care all that much about TSO either. Would’ve been nice if it was an oversight and just lacking testing but apparently it was an intentional decision so *shrug*
22:07hdbngr has quit [Ping timeout: 480 seconds]
22:08mmediouni[m]bad decisions abound, especially when SPRR + GXF are very much testable in VMs officially bc PCC vre
22:08svenyeah :(
22:09mmediouni[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
22:10mmediouni[m]so all this stuff really doesn't make much sense tbh
22:11svenit’s a pity really
22:11svenespecially because they don’t seem to test the non-entitled boot mode and the approach seems to have been „just lock down everything that’s not in the arm arm“
22:12JamesCalligeros[m]all we can do is keep filing radars i suppose
22:12mmediouni[m]And making Linux work with libsptm sounds to be more pain than it's worth
22:13mmediouni[m]And non upstreamable
22:13JamesCalligeros[m]no one is volunteering to rewrite mm
22:13mmediouni[m]the sptm to xnu ABI is surprisingly very stable though
22:13JamesCalligeros[m]it would be implementing an entirely new arch
22:14mmediouni[m]It's not that much of a bad fit but yeah...
22:16svenI’ll be happy enough if they maybe unlock a few more regs (see above) and don’t regress them for every new soc release then
22:18svenwe have a path that looks viable to fix that SPRR/GXF mess now at least
22:20mmediouni[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
22:21svenIt’s not *great*, it’s just enough for tracing
22:22svenSafari with aprr_jit=0 in bootargs e.g. pegs a cpu core at 100% almost completely in the hv and doesn’t even start after 10 minutes
22:22svenI also had to steal about a GB of RAM to have enough headroom to cache the shadow copies of the pagetables
22:23JamesCalligeros[m]hopefully we wont need to trace safari then (or any JITted software)
22:23svenif it comes to that we can probably patch that dylib to make the msr/mrs into a nop and just mal the jit index as rwx
22:24chaos_princesssafari shouldn't have any spicy entitlements, so whatever?
22:24svenyeah, I doubt it’ll be necessary
22:25svendunno what the gpu folks need to trace but even that shouldn’t be a problem
22:25chaos_princessthe only relatively spicy thing that safari had was vp9, but 1. its done, 2. there are other ways
22:25svenyeah, and if we have to we can make safari or any other process that uses jit work
22:26svenbut that’s problems for later, first I need to actually support gl0 and then bring up SPTM and TXM in there
22:51MrnasTechGuy has joined #asahi-dev
22:52MrnasTechGuy has quit [Remote host closed the connection]
22:52MrnasTechGuy has joined #asahi-dev
22:53MrnasTechGuy has quit [Remote host closed the connection]
23:24hdbngr has joined #asahi-dev
23:24ninelore has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
23:32hdbngr has quit [Ping timeout: 480 seconds]
23:42ninelore has joined #asahi-dev
23:46farchordsven: Actually, the ban occured because he posted an image right after posting.
23:47farchordWe got a decent amount of bots that did that in the past. Join and just post really.... bad images
23:47farchords/posting/joining/
…