#
#asahi-dev · 2026-06-15 17:11
nickchanthere's a difference if you look at m1n1 code when stopping the cpu there's a deep_sleep switch
#asahi-dev · 2026-06-15 17:11
nickchansven: correct if the secondaries are active
#asahi-dev · 2026-06-15 17:11
yukaat least with deep sleep I meant exactly what you did
#asahi-dev · 2026-06-15 17:11
yukaI think this is a terminology problem
#asahi-dev · 2026-06-15 17:11
svenand then it ended up at the entry point again?!
#asahi-dev · 2026-06-15 17:10
nickchanall i did is set non retention wfi
#asahi-dev · 2026-06-15 17:10
nickchani did not do deep sleep in that code
#asahi-dev · 2026-06-15 17:10
chaos_princessi also set a pile of extra stuff in ACC_OVRD, and actually do this on all cores
#asahi-dev · 2026-06-15 17:09
sveniirc chaos_princess managed to put all cores to sleep but never got them to wake up again :(
#asahi-dev · 2026-06-15 17:09
svenwe know that the deep sleep code in utils.c or whatever works for the seconaries
#asahi-dev · 2026-06-15 17:08
svenhrm.. though we'd ideally want all cores to be in deep sleep for this to make sense
#asahi-dev · 2026-06-15 17:07
svennickchan: nice!
#asahi-dev · 2026-06-15 17:07
nickchansince FIQ is part of the core complxes despite being handled in the "AIC" driver in linux
#asahi-dev · 2026-06-15 17:06
nickchani think it's possible with an IRQ instead of a FIQ but i think i will leave it at this today
#asahi-dev · 2026-06-15 17:05
yukathe question is if you can do this with all cores in a cluster and still have them wake up again somehow
#asahi-dev · 2026-06-15 17:04
yukaif some other core is not in deep sleep
#asahi-dev · 2026-06-15 17:04
yukasmp_start_secondaries means the cluster doesn't turn off, no?
#asahi-dev · 2026-06-15 17:02
nickchansmp_start_secondaries is required for some reason.
#asahi-dev · 2026-06-15 17:01
nickchansven: https://github.com/HoolockLinux/m1n1/blob/1ab9d328d46bca797a2d2cd451cd7553ce6b2a97/proxyclient/experiments/rvbar.py this causes primary cpu to restart, at least on t6000
#asahi-dev · 2026-06-15 16:57
nickchanokay
#asahi-dev · 2026-06-15 16:45
nickchanerm im stupid ive been setting cyc_ovrd's wfi_ret backwards
#asahi-dev · 2026-06-15 16:44
nickchanwith bit [56] set access to ARM PMUv3 registers in EL1 will be trapped to EL2 with EC==0x3f
#asahi-dev · 2026-06-15 16:44
nickchanthe contents of this register is implementation defined
#asahi-dev · 2026-06-15 16:42
chaos_princessok then
#asahi-dev · 2026-06-15 16:42
nickchanchaos_princess: pmu emulation uses hacr_el2 [56]
#asahi-dev · 2026-06-15 16:28
chaos_princessis pmu related to locked reg or sth else?
#asahi-dev · 2026-06-15 16:02
mazquite.
#asahi-dev · 2026-06-15 16:00
nickchanmicrosoft Windows needs it but clearly you are not the target audience for that kind of stuff
#asahi-dev · 2026-06-15 15:59
mazPMU emulation is pretty much useless for anything real, TBH.
#asahi-dev · 2026-06-15 15:58
nickchanreplacement only if one does not need the arm performance counters inside the vm
#asahi-dev · 2026-06-15 15:57
nickchansimply clear cyc_ovrd's wfi_ret and setting wfi force start does not allow boot cpu to restart via wfi at least on t6000
#asahi-dev · 2026-06-15 15:49
mazjannau: thanks for the feature register dump. I'm glad to see that NV2 is indeed present... could be a replacement for the M2 air one day.
#asahi-dev · 2026-06-15 15:36
yukathe parameter is literally called entry
#asahi-dev · 2026-06-15 15:36
yukaAh I'm dumb it gets passed and gets written to elr_el2
#asahi-dev · 2026-06-15 15:35
yukaI don't see that being set anywhere related to hv
#asahi-dev · 2026-06-15 15:34
yukait sounds like it should continue executing at elr_el1
#asahi-dev · 2026-06-15 15:32
yukadoesn't look like it
#asahi-dev · 2026-06-15 15:30
yukait should start executing guest code? is the pc part of SPSR which is restored in hv_enter_guest?
#asahi-dev · 2026-06-15 15:29
yukaand then I get an exception which I can't quite tell where it is coming from
#asahi-dev · 2026-06-15 15:29
yukaI don't quite understand where it jumps from there
#asahi-dev · 2026-06-15 15:29
yukathe current status is: I know that it runs up to the eret in hv_enter_guest
#asahi-dev · 2026-06-15 15:25
svenwe don't guarantee that different versions of proxyclient vs m1n1 work anyway so the only error that could happen is a change to the structure on the m1n1 side without a change to the .py file
#asahi-dev · 2026-06-15 15:24
svensure, unless you want to build something more fancy :D
#asahi-dev · 2026-06-15 15:24
yukaor is that too error prone in case the struct changes
#asahi-dev · 2026-06-15 15:24
yukajust return the raw struct and then unpack it in the proxyclient?
#asahi-dev · 2026-06-15 15:22
svencould probably just add a proxyclient call that returns the cpu features
#asahi-dev · 2026-06-15 15:21
yukalots of stuff the hv is trying to do (SPRR, GXF, AMX) is not available ofc
#asahi-dev · 2026-06-15 15:21
yukawe need an equivalent of cpu_features->apple_sysregs_unlocked in the proxyclient code, or is there a way to pull cpu features from the running m1n1 to not duplicate them?
#asahi-dev · 2026-06-15 15:20
yukaI'm trying to run m1n1 in m1n1 hv on M4
#asahi-dev · 2026-06-15 15:19
nickchanhm actually let me try to make it happen on t6000

plus ›