#asahi-dev · 2025-06-09 13:22
fl0_idjust with those 2 adts, the int not subscriptable error doesn't make sense to me, as both adts have an int there as far as I can tell ... so neither should be subscriptable#asahi-dev · 2025-06-09 13:21
fl0_idat least compatible of the subtype is different. compatible = [pmu,spmi, pmu,chapel] - compatible = [pmu,spmi, pmu,stowe] --- ok that is actually close enough that it should work#asahi-dev · 2025-06-09 13:19
fl0_idlike for some reason the error points to reset_pani_counter, but might be that actually before it fails during find_primary_pmu in m1n1/hw/pmu.py#asahi-dev · 2025-06-09 13:14
fl0_idon my m3 max adt it is spmi-chapelL1-b (primary) or spmi-chapelF1-b#asahi-dev · 2025-06-09 13:12
fl0_idin linked m2 adt the subgroup is pmu-main or pmu-aux#asahi-dev · 2025-06-09 13:11
fl0_id* numb-spmi0-X I mean#asahi-dev · 2025-06-09 13:11
fl0_idwhat is different is the sub-group (or whatever the correct name is) to nub-spmi#asahi-dev · 2025-06-09 13:11
fl0_idso it seems the info-leg_scrpad = <some int> is the same#asahi-dev · 2025-06-09 13:10
fl0_idok, found one in irc logs. https://tpaste.us/yvby#asahi-dev · 2025-06-09 11:54
fl0_idor if somebody could check what nub-spmi / spmi-chapelL1-b (this one might also be different for those) / info_leg_scrpad has as a value#asahi-dev · 2025-06-09 11:39
fl0_iddoes somebody maybe have an m2 pro or max adt to send me, for comparison? just to see what it looks like compared to what m3 has#asahi-dev · 2025-06-08 10:55
fl0_idthx for the input#asahi-dev · 2025-06-08 10:55
fl0_idright, true#asahi-dev · 2025-06-08 10:39
chaos_princessthere is the possible downside that if you are messing with the disk, there is a chance that it will destroy all oses that are installed in that container, but i don't think that is likely#asahi-dev · 2025-06-08 10:38
fl0_idok cool#asahi-dev · 2025-06-08 10:38
chaos_princessthat should work#asahi-dev · 2025-06-08 10:38
fl0_idchadmed chaos_princess thx. just to clarify. I have a stub install for m1n1 already (separate partition) But afaik a normal macos install can be installed in the same partition (but separate volume). And that is less steps/easier to do than making another partition afaik. So for running under hv, can I just install it in the m1n1 or original macOS container? (but separate volume ofc)#asahi-dev · 2025-06-08 08:37
mazyou could implement the emulation in userspace if you wanted, it wouldn't be a massive change to the KVM code.#asahi-dev · 2025-06-08 08:35
maznickchan: oh, KVM supports trapping the IMPDEF stuff alright. It actually sets the trap bit (HCR_EL2.TIDCP), and inject an UNDEF as a result.#asahi-dev · 2025-06-08 08:27
nickchanand then of course there's el3 on s8000 but that should be trivial to patch given that xnu monitor has a grand total of two smcs#asahi-dev · 2025-06-08 08:26
nickchanerm it can work with arm's model of hw virt on paper but neither hvf or kvm seem to support trapping those impdef sysregs#asahi-dev · 2025-06-08 08:13
nickchanand hvf and kvm can't possibly work due to all those custom sysregs#asahi-dev · 2025-06-08 08:11
nickchani ran m1n1 in an emulator but ultimately not super useful (sw model: iPhone 6s Plus) and qemu's tcg is so slow so framebuffer is pratically unusable#asahi-dev · 2025-06-07 23:50
amarioguymay as well try tho#asahi-dev · 2025-06-07 23:49
amarioguysven: no yea for sure this is definitely not a single day work, definitely didn't mean to imply that, personally doubt i'm gonna be the one to finish it out#asahi-dev · 2025-06-07 23:35
chadmedif you have data on macos that you care about then ofc you should use a second macos install with the hv #asahi-dev · 2025-06-07 23:33
chadmedif you want to save space you _can_ install m1n1 on top of your macos install. the operation is reversible by running bputil -f on the container#asahi-dev · 2025-06-07 23:27
chaos_princessyou need a real macos install to run it under hv, otherwise it will kernel panic shortly after loading the kernel#asahi-dev · 2025-06-07 23:25
fl0_id(I hope Ia m using container correctly here... the apfs container in the separate partition I mean, wherein one would then create a separate volume as desribed here https://asahilinux.org/docs/sw/m1n1-hypervisor/#running-macos-under-the-m1n1-hypervisor#asahi-dev · 2025-06-07 23:24
fl0_idfor running a debug macos under hv, is it better to do this in the m1n1 container or in the original macos container?#asahi-dev · 2025-06-07 22:09
svenfeel free to prove me wrong but I think this is a bit more than a single day‘s work :D#asahi-dev · 2025-06-07 22:05
amarioguyok fair enough - should be able to work on this tomorrow then#asahi-dev · 2025-06-07 22:04
svenel1 can’t turn them on if they’re off in el2#asahi-dev · 2025-06-07 22:03
svenjust don’t turn them on #asahi-dev · 2025-06-07 21:56
amarioguyor do we just...not let anything access gl2?#asahi-dev · 2025-06-07 21:55
amarioguy(for m1/m2/m3)#asahi-dev · 2025-06-07 21:55
amarioguysven: i assume to "disable" SPTM/GXF - we need to set the same defeature register iboot sets on m4?#asahi-dev · 2025-06-07 21:42
amarioguyok so will have to do a mach-o here then#asahi-dev · 2025-06-07 21:42
svenhttps://github.com/apple-oss-distributions/xnu/blob/main/osfmk/arm64/sptm/start_sptm.s#L34#asahi-dev · 2025-06-07 21:41
svenone of the first thing it does it call out to SPTM there#asahi-dev · 2025-06-07 21:41
svenyeah, open source xnu contains the SPTM entry point#asahi-dev · 2025-06-07 21:41
svenit's gonna disable all apple-specific extensions#asahi-dev · 2025-06-07 21:40
amarioguyi assume the KDK kernels also need SPTM?#asahi-dev · 2025-06-07 21:40
amarioguyyes exactly my concern, if the de-feature disables the nested case, that's bad#asahi-dev · 2025-06-07 21:39
svenwhich is disabled for raw boot objects so that won't help us i think#asahi-dev · 2025-06-07 21:39
svennested sptm/gxf virt probably just uses the hardware itself#asahi-dev · 2025-06-07 21:39
amarioguybtw moving to asahi-re for a sec#asahi-dev · 2025-06-07 21:39
svenso we'll need two sets of shadow pagetables for XNU-EL2 and XNU-GL2 and keep that all in sync#asahi-dev · 2025-06-07 21:39
amarioguyright - i have an m4 system anyhow, just got it in today so i can look into it in a day or so - i believe apple does have a way to do nested virtualization of SPTM/GXF stuff so it probably can be done but to say "messy" is putting it lightly i suspect#asahi-dev · 2025-06-07 21:37
svenit's gonna be messy though since the pagetable permission bits will be all wrong and we'll have to fix that all up