#
✕ nick:StanfordAppliedCyber[m]
#asahi-dev · 2026-07-10 10:39
StanfordAppliedCyber[m]that'll be a followup PR after we merge this one
#asahi-dev · 2026-07-10 10:39
StanfordAppliedCyber[m]i think i'm done with dev tooling for a bit, other than trying to usptream this thing i'm going to take a break and write some drivers. may add exclave support when my m5 air comes, but that's it
#asahi-dev · 2026-07-10 10:34
StanfordAppliedCyber[m]i'm assuming it'll need a lot of work given this is my first time doing anything like this
#asahi-dev · 2026-07-10 10:33
StanfordAppliedCyber[m]hypervisor PR made, i'm off at a slightly less unreasonable hour for once today
#asahi-dev · 2026-07-10 10:33
StanfordAppliedCyber[m]https://github.com/AsahiLinux/m1n1/pull/622
#asahi-dev · 2026-07-10 10:25
StanfordAppliedCyber[m]it seems like the obviously right option
#asahi-dev · 2026-07-10 10:25
StanfordAppliedCyber[m]i assume on m4+ we're just gonna default to psci by default?
#asahi-dev · 2026-07-10 09:54
StanfordAppliedCyber[m]well, assuming the new cores aren't just different for some reason, but the super cores don't start either
#asahi-dev · 2026-07-10 09:54
StanfordAppliedCyber[m]right
#asahi-dev · 2026-07-10 09:23
StanfordAppliedCyber[m]but them just changing the offsets, especially when introducing a new core, seems pretty normal?
#asahi-dev · 2026-07-10 09:22
StanfordAppliedCyber[m]see: ALL OF MY MACBOOK NEO TROUBLES
#asahi-dev · 2026-07-10 09:22
StanfordAppliedCyber[m]like i'm FULLY willing to believe that apple fucked up smp
#asahi-dev · 2026-07-10 09:19
StanfordAppliedCyber[m]--> that needs a hypervisor that yall don't have?
#asahi-dev · 2026-07-10 09:19
StanfordAppliedCyber[m]like, wouldn't we need to trace macos to get to that point to know what the offsets are
#asahi-dev · 2026-07-10 09:19
StanfordAppliedCyber[m]dumb question, how do we know how to start secondaries on t6050 enough to say that macos is the problem?
#asahi-dev · 2026-07-10 06:17
StanfordAppliedCyber[m]great, just checking my current understanding
#asahi-dev · 2026-07-10 06:11
StanfordAppliedCyber[m]for the hv m1-m3 boots with mmu disabled, and then xnu enables the mmu as part of its startup right?
#asahi-dev · 2026-07-09 23:55
StanfordAppliedCyber[m]does m3 have sme?
#asahi-dev · 2026-07-09 23:49
StanfordAppliedCyber[m]i'm surprised how reliable this is, unlike m3 i don't get any nondeterminism at all in the upstreamable branch. the old version had some problems (mostly timing related) but i haven't hit a single flake in the branch i'm upstreaming
#asahi-dev · 2026-07-09 23:22
StanfordAppliedCyber[m]we'll need to figure out the right shape for this
#asahi-dev · 2026-07-09 23:22
StanfordAppliedCyber[m]initial PR is going to have hardcoded addresses for the commpage fixes
#asahi-dev · 2026-07-09 22:17
StanfordAppliedCyber[m]yeah i got regular trapping to work
#asahi-dev · 2026-07-09 21:13
StanfordAppliedCyber[m]i cant physically touch the mac rn (rdp session) but i can figure that out if it'd be helpful
#asahi-dev · 2026-07-09 21:12
StanfordAppliedCyber[m]great question
#asahi-dev · 2026-07-09 21:12
StanfordAppliedCyber[m]so you have to fake those register values, which is annoying because macos accesses them a LOT, so you have to move sysreg handling to C
#asahi-dev · 2026-07-09 21:12
StanfordAppliedCyber[m]the issue with just disabling sme though is you have to add a lot of other code, because xnu reads arm architectural registers
#asahi-dev · 2026-07-09 21:11
StanfordAppliedCyber[m]SMPRIMAP_EL2 is the register that first caused the problem to manifest
#asahi-dev · 2026-07-09 21:11
StanfordAppliedCyber[m]the initial configuration definitely needs el2
#asahi-dev · 2026-07-09 21:11
StanfordAppliedCyber[m]looking at these actually i think the context switch ones may work in el1
#asahi-dev · 2026-07-09 21:11
StanfordAppliedCyber[m]example reg is CAPCR_EL1
#asahi-dev · 2026-07-09 21:11
StanfordAppliedCyber[m]yeah that's what i do
#asahi-dev · 2026-07-09 21:09
StanfordAppliedCyber[m]it's just an el1 vs el2 issue
#asahi-dev · 2026-07-09 21:09
StanfordAppliedCyber[m]everything is fully supported
#asahi-dev · 2026-07-09 21:09
StanfordAppliedCyber[m]no
#asahi-dev · 2026-07-09 21:09
StanfordAppliedCyber[m]right now i'm literally just disabling sme by tossing bits in the arm architectural registers
#asahi-dev · 2026-07-09 21:09
StanfordAppliedCyber[m]msr
#asahi-dev · 2026-07-09 21:09
StanfordAppliedCyber[m]so the obvious example i thought was to just replay the access in el2, but because it hits xnu's own exception handler we don't have visibility into what's going on
#asahi-dev · 2026-07-09 21:08
StanfordAppliedCyber[m]access from el2 works fine
#asahi-dev · 2026-07-09 21:08
StanfordAppliedCyber[m]by default, accessing the registers causes SIGILL and a trap to xnu's own sigill handler
#asahi-dev · 2026-07-09 21:07
StanfordAppliedCyber[m]there appear to be a set of registers related to SME that are used on thread context switch thar are not writable from el1
#asahi-dev · 2026-07-09 21:06
StanfordAppliedCyber[m]tl;dr sme is causing issues
#asahi-dev · 2026-07-09 21:06
StanfordAppliedCyber[m]also can i solicit maintainer feedback on something else?
#asahi-dev · 2026-07-09 21:06
StanfordAppliedCyber[m]yuka previously said she can clean room the emulator, tbh it's really not that bad, the docs i'm writing are quite nice nd most of the custom code is isolated to a single table
#asahi-dev · 2026-07-09 21:05
StanfordAppliedCyber[m]so unfortunately not immediately usable by anyone who isnt me
#asahi-dev · 2026-07-09 21:05
StanfordAppliedCyber[m]excluding
#asahi-dev · 2026-07-09 20:26
StanfordAppliedCyber[m]need to write some commit messages, add some comments, then it's PR time
#asahi-dev · 2026-07-09 20:26
StanfordAppliedCyber[m]upstreamable hypervisor works!
#asahi-dev · 2026-07-09 01:47
StanfordAppliedCyber[m]in particular if there's a third option i missed
#asahi-dev · 2026-07-09 01:44
StanfordAppliedCyber[m]but wanted to get upstream feedback on this problem
#asahi-dev · 2026-07-09 01:44
StanfordAppliedCyber[m]i'm inclined to say that option 2 is more upstream friendly? as a bonus i think you can just pull the PA of the commpage straight from the SPTM emulator (just look for the RETYPE call)

plus ›