#
#asahi-dev · 2026-02-11 11:11
murdakahOh right ok that makes sense, so XNU requires GXF and thus GL2, and because of that we cant run XNU in the raw object mode in a hypervisor
#asahi-dev · 2026-02-11 11:09
NickChan[m](talking about gxf)
#asahi-dev · 2026-02-11 11:09
NickChan[m]murdakah: it's a feature used by apple silicon xnu so it is needed to virtualize apple silicon xnu
#asahi-dev · 2026-02-11 11:08
NickChan[m](if you check the previous messages, right now *nothing* can be virtualized because of critical system register is disabled, but that might be a big)
#asahi-dev · 2026-02-11 11:08
murdakahOk I htink thats the part I don't imderstand, how enabling GXF enables virtualisation
#asahi-dev · 2026-02-11 11:08
murdakahGot it, and thats the restricted memory access.
#asahi-dev · 2026-02-11 11:07
NickChan[m]a lot of other ISA extensions required by apple silicon xnu is also disabled
#asahi-dev · 2026-02-11 11:07
NickChan[m]But on m4 m1n1/raw boot object starts executing in EL2 with GXF completely disabled so it is not possible to vietualize xnu in a similar way as on previous chips
#asahi-dev · 2026-02-11 11:06
NickChan[m]for example; HCR_EL2 can't be written to in EL2 when GL2 is enabled
#asahi-dev · 2026-02-11 11:05
murdakahnickchan: Ah ok that makes more sensem that it sused to be EL2 and now is GL2
#asahi-dev · 2026-02-11 11:05
NickChan[m]since it's turned off it is entirely up to m1n1 to enable gxf and start executing code in GL2, and enabling GXF adds restrictions to the normal EL levels
#asahi-dev · 2026-02-11 11:05
NickChan[m]well with gxf turned off
#asahi-dev · 2026-02-11 11:04
NickChan[m]on m1 m2 m3 m1n1 starts executing in EL2 with GL2 turned off
#asahi-dev · 2026-02-11 11:04
NickChan[m]Yes
#asahi-dev · 2026-02-11 11:04
murdakahGXF meaning guarded exception levels right?
#asahi-dev · 2026-02-11 11:03
murdakahThanks Nick. So how does that not limit us more? Because GL2 sounds more restrictive than EL2?
#asahi-dev · 2026-02-11 11:03
NickChan[m]GXF is introduced in A13 with GL0 and GL1 (register encoding work slightly different there); and underwent a significant revision in A14/M1 adding GL2 since the CPU now has EL2 support
#asahi-dev · 2026-02-11 11:01
NickChan[m]murdakah: GL2 is still there on M4 just disabled in raw boot object mode
#asahi-dev · 2026-02-11 11:00
murdakahHowdy! I've just watched Sven's talk at 39C3 and I'm really interested to know what changed between M3 and M4 regarding EL2 and GL2, and whether GL2 was always there or that the ISA extensions have merely been disabled in the new chips?
#asahi-dev · 2026-02-11 10:37
integralpilotoh that's good :D
#asahi-dev · 2026-02-11 10:37
svenno promises, but they want to support Linux while the kdk releases have been a mess for a long time
#asahi-dev · 2026-02-11 10:36
sven*bootloop
#asahi-dev · 2026-02-11 10:36
svenlet’s just say I’ve been more successful in e.g. getting that raw object bootloader on m4 fixed with a feedback assistant report ;)
#asahi-dev · 2026-02-11 10:33
integralpiloti'm not really sure if it's good for low-level stuff but let's hope
#asahi-dev · 2026-02-11 10:33
integralpilot(meaning, on it, you couldn't build ANY kernel collections, even of older OSes, their tooling just wouldn't allow it without a KDK matching the currently running build number)
#asahi-dev · 2026-02-11 10:32
integralpilotthey never replied to the one i made when the latest macOS was missing a KDK
#asahi-dev · 2026-02-11 06:06
svenI’ve filed a feedback assistance thingy about that msr last week, so let’s see what happens
#asahi-dev · 2026-02-11 05:54
svensame
#asahi-dev · 2026-02-11 04:57
JamesCalligeros[m]i do have a feeling that some of the stuff that's ended up disabled in raw boot object mode is probably not intentional
#asahi-dev · 2026-02-11 03:52
nicolas17nickchan: fun fact, a few years ago never_released wanted to play around with nested virtualization and only had M1, so I gave him an ssh account on my M2 Mac; a month later I rebooted and saw him in the macOS login screen and freaked out for a second until I remembered >.>
#asahi-dev · 2026-02-11 03:48
nickchanin qualcomm case essentially exploits happened and people get el2
#asahi-dev · 2026-02-11 03:36
nickchanfor starter on how complex that would be, s3_4_c15_c10_7 is a register similar to the ARM VNCR_EL2 but for all the custom registers :-)
#asahi-dev · 2026-02-11 03:35
nickchannicolas17: nested virtualization
#asahi-dev · 2026-02-11 03:35
nicolas17...what's "NV"?
#asahi-dev · 2026-02-11 03:33
nickchanand if users stack another layer of NV on that it would be even worse
#asahi-dev · 2026-02-11 03:33
nickchanand that's not ideal because nv performance is bad
#asahi-dev · 2026-02-11 03:29
nickchannot a high bar but just show how much it is possible to get away with
#asahi-dev · 2026-02-11 03:28
nickchan(context: obviously EL1/vEL2 linux VM worked under macOS somehow)
#asahi-dev · 2026-02-11 03:26
nicolas17then there's M5 where I think every OS is using exclaves (:
#asahi-dev · 2026-02-11 03:25
nickchan(they emulated smmu)
#asahi-dev · 2026-02-11 03:25
nickchanyes this is cursed but honestly that's just qualcomm level of cursedness from perspective of linux
#asahi-dev · 2026-02-11 03:25
nickchanit would need some sort of virtual smmu though
#asahi-dev · 2026-02-11 03:24
nickchanthis is why I said EL1
#asahi-dev · 2026-02-11 03:24
nickchanbecause no RWX
#asahi-dev · 2026-02-11 03:24
nickchannicolas17: that will never work
#asahi-dev · 2026-02-11 03:24
nicolas17/s
#asahi-dev · 2026-02-11 03:24
nicolas17write a driver to make Linux delegate its pagetable management to Apple's SPTM code, how hard could it be
#asahi-dev · 2026-02-11 03:23
nickchanbut this is way too cursed and complex given that all the custom registers need to be save/restored too
#asahi-dev · 2026-02-11 03:23
nickchanit's always possible to have m1n1 running under sptm and put linux in EL1 and use NV to say it's EL2 but way way too cursed
#asahi-dev · 2026-02-11 03:21
nicolas17I don't consider qualcomm to be a high bar :p https://wetdry.world/@ipg/114999351341131151

plus ›