#
✕ nick:sven
#asahi-dev · 2026-10-26 17:56
svenwhere did 0xfffffe003c9f3a84 come from?
#asahi-dev · 2026-10-26 17:56
svenhuh, that's not the mrs/msr for an impdef sysreg I expected
#asahi-dev · 2026-10-26 16:33
svenm4 to m5 seems easier than expected. I effectively already have two separate VMs in EL1 on m4 so what’s one more for m5? ;)
#asahi-dev · 2026-10-26 16:30
svenRemember how you promised a m5 gpu driver if you get a m5 hypervisor? 😁
#asahi-dev · 2026-10-26 16:12
svenpretty sure that's from exclave userspace
#asahi-dev · 2026-10-26 16:12
sven\o/
#asahi-dev · 2026-10-26 16:12
svenUnknown: InternalExclaveLauncher/ResourceManager.swift:911: Fatal error: 'try!' expression unexpectedly raised an error: Launcher.Device at PC: 0x0000c00a1c7c, LR: 0x0000c009a2f8
#asahi-dev · 2026-10-26 13:22
svenbecause it’s unrelated to that series
#asahi-dev · 2026-10-25 22:31
svenwould be nice if this all works without hacking exclave support into all this
#asahi-dev · 2026-10-25 22:31
svenalright, it's crashing some some sysreg inside XNU now that I don't patch out yet. enough progress for today
#asahi-dev · 2026-10-25 22:28
svendo you know why they don't expose MTE in vms?
#asahi-dev · 2026-10-25 22:28
svenmmediouni[m]: ah, makes sense!
#asahi-dev · 2026-10-25 22:26
svenyuuup, creating a SPTMDebug memory region and just making it 16 KiB (which it actually is supposed to be I think) + 2 GiB seems to work :D
#asahi-dev · 2026-10-25 22:18
svenif it doesn't I'll just go back to patching out that panic and steal memory from the beginning of RAM again
#asahi-dev · 2026-10-25 22:18
svenlet's see if that works
#asahi-dev · 2026-10-25 22:18
svenbut I think I may have found a way to steal some memory (just a little 2 GiB hole) from SPTM without it complaining :D
#asahi-dev · 2026-10-25 22:18
svenyeah, it's tagging (real) physical addresses
#asahi-dev · 2026-10-25 21:51
svenah.. I think there's no need for a separate EL1 storage because the allocation tags are for _physical_ addresses
#asahi-dev · 2026-10-25 21:38
svenapparently "tag ram" stores the allocation tags and that seems to be IMPDEF? I dunno
#asahi-dev · 2026-10-25 21:37
svenno idea
#asahi-dev · 2026-10-25 21:34
svenbut I'd assume mte can just be enabled at el1 no matter what the state at el2 is
#asahi-dev · 2026-10-25 21:34
svenno idea
#asahi-dev · 2026-10-25 21:34
svenyeah, I think that might work. [fake mte tag region][sprr shadow pagetables][real mte tag region] and then just map fake to real via stage 2 and pretend RAM ends after the fake region
#asahi-dev · 2026-10-25 21:33
svenI don't know if SPTM tries to write to that region.. though I guess I could remap those writes via stage 2
#asahi-dev · 2026-10-25 21:31
svenwriting to that IMPDEF register to move that region results in an serror ofc :(
#asahi-dev · 2026-10-25 21:30
svenand sptm really wants to be able to access (or at least create pagetable entries) for that region
#asahi-dev · 2026-10-25 21:30
svenso far the issue is that there's some apple IMPDEF reg that points to end_of_useable_ram - $whatever and that's where I store the sprr shadow pageables
#asahi-dev · 2026-10-25 21:29
svenI have no idea :D
#asahi-dev · 2026-10-25 21:23
svenstill gotta figure out where to place the shadow pagetables though with that new MTE crap
#asahi-dev · 2026-10-25 21:21
svenok, pretty sure that sptm doesn't set up any stage 2 translations for cl4 so this shouldn't be too bad I think
#asahi-dev · 2026-10-25 19:28
svenchances are it's a msr/mrs for some sysreg
#asahi-dev · 2026-10-25 19:27
svennext step is to use disassemble_at and figure out what generated the exception
#asahi-dev · 2026-10-25 19:26
sventhen you'll have to debug from the hv :(
#asahi-dev · 2026-10-25 19:25
svenohh... i assumed it was already running in device mode
#asahi-dev · 2026-10-25 19:09
svenif i were to bet this is an UNDEF instruction because there's some new sysreg in the a18 pro kernel the m4 pro one doesn't have ;)
#asahi-dev · 2026-10-25 19:08
svenif the first one pops up the second one will also appear
#asahi-dev · 2026-10-25 19:08
svenno
#asahi-dev · 2026-10-25 19:08
svendisassemble_at actually
#asahi-dev · 2026-10-25 19:07
sventhey should already be there before you start the hv
#asahi-dev · 2026-10-25 19:07
svenyes, you should have two ttys in /dev
#asahi-dev · 2026-10-25 19:07
svenor maybe it was disassmble_at
#asahi-dev · 2026-10-25 19:07
svendisassemble(addr, size) from the hv shell should work I think
#asahi-dev · 2026-10-25 18:58
sventhis has to be very early if you really see nothing on the second ACM device
#asahi-dev · 2026-10-25 18:58
svenso then dump the exception register file and see what actually cause the exception
#asahi-dev · 2026-10-25 18:57
sventhe dump ELR_EL12, FAR_EL12, ... to figure out what cause the exception
#asahi-dev · 2026-10-25 18:56
svencontext should show it's stuck inside a 1: wfe b 1b loop
#asahi-dev · 2026-10-25 18:56
svenif it fails even before that you'll have to debug with the hv
#asahi-dev · 2026-10-25 18:56
svenwhen you see the progress bar SPTM has handed control to XNU and it prints something like "Darwin Kernel 26.x.x..." very very early
#asahi-dev · 2026-10-25 18:55
sven^-- that too :D
#asahi-dev · 2026-10-25 18:54
svenyou want at least debug=0x14e serial=3 wdt=-1

plus ›