#
✕ nick:sven
#asahi-dev · 2026-07-16 20:08
svenamarioguy: lol
#asahi-dev · 2026-07-16 20:06
sven(tl;dr: disable irqs, etc., grab old ttbr values, cpu_do_switch_mm with some small tweaks to be noinstr to a pinned mm, jump to m1n1, just restore the old ttbr values. i'm sure that's gonna go over well on the ML but it's the best i can come up with :D)
#asahi-dev · 2026-07-16 20:04
svenin psci-via-efi news, v2 is going to be slightly more cursed but i think i finally came up with a way to switch mm in no-RCU/noinstr context that doesn't totally suck. just gotta convince myself it's actually safe now
#asahi-dev · 2026-07-16 17:55
svenweird
#asahi-dev · 2026-07-16 17:03
svenbecause the latter is fine, that's just AIC_EVENT_TYPE GENMASK(23, 16) set to AIC_EVENT_TYPE_IRQ 1
#asahi-dev · 2026-07-16 17:02
svenas u32 irq or as irq_hw_number_t hwirq?
#asahi-dev · 2026-07-16 16:31
sven*user
#asahi-dev · 2026-07-16 16:31
svenat ccc there was at least one non-asahi linux users with brcmfmac who also ran into that one
#asahi-dev · 2026-07-16 16:31
svensounds like a fun project to fix it! :P
#asahi-dev · 2026-07-16 15:57
svenif anyone wants to test and/or review something: i'd like to pick up https://lore.kernel.org/asahi/20260714-smc-subdev-dt-v2-0-13fa78873121@gmail.com/T/#t soonish
#asahi-dev · 2026-07-16 14:20
svenThis really sounds like my tbt issues :D
#asahi-dev · 2026-07-15 07:57
sveneither way, these devices are radioactive for multiple reasons so let's just not discuss or use them in any way
#asahi-dev · 2026-07-15 07:32
svenit's only been him asking something for the third time now, isn't it?
#asahi-dev · 2026-07-15 07:31
svenyup
#asahi-dev · 2026-07-15 07:29
svenyou've been warned twice now not to talk about development fused devices
#asahi-dev · 2026-07-15 07:29
sven*sigh**
#asahi-dev · 2026-07-15 06:02
svenSounds like my tbt experience!
#asahi-dev · 2026-07-14 20:11
sveni wouldn't add it there, that already has a link to the contribute guideline which will contain the policy after sofus's PR
#asahi-dev · 2026-07-14 19:57
svenprobably because it was easy to add it there :D
#asahi-dev · 2026-07-14 19:36
svenhttps://f.svpe.de/26f36ecb45f496f84662374de6a35087b2f5751f5ee5ecbfcd527e23a9df1369_Screenshot_20260714_213522.png
#asahi-dev · 2026-07-14 19:33
sveneh.. the "for legal reasons" made my local claude actually listen to it and refuse to do anything before I deleted that file again
#asahi-dev · 2026-07-14 19:27
sveni like that idea. https://github.com/AsahiLinux/m1n1/pull/625
#asahi-dev · 2026-07-14 09:50
sven🥳
#asahi-dev · 2026-07-14 07:44
svenagreed. but it's great you found that timer thing!
#asahi-dev · 2026-07-14 07:31
svenwhich also explains why we don't hit this on m1/m2
#asahi-dev · 2026-07-14 07:31
svenso it's probably really "write SYS_IMP_APL_AGTCNTRDIR_EL1, isb, write CNTHCTL_EL2" that's required instead of the other way around
#asahi-dev · 2026-07-14 07:31
svennice!
#asahi-dev · 2026-07-14 07:27
svendoes it run on stable on all cores now?
#asahi-dev · 2026-07-14 07:24
svenlooking at his change the issue seems to be setting CNTHCTL_EL2 before setting up apple's counter redirection
#asahi-dev · 2026-07-14 06:58
svenyeah, might just be some subtle hardware difference. very nice find!
#asahi-dev · 2026-07-14 06:53
sven*hit
#asahi-dev · 2026-07-14 06:53
svenweird that we didn't git that on m1/2 though
#asahi-dev · 2026-07-14 06:53
svenhah, nice
#asahi-dev · 2026-07-13 18:14
sveni guess the spinlock code in xnu is open source, isn't it? so if it's really some timer issue we should be able to figure out what exactly it relies on
#asahi-dev · 2026-07-13 18:13
svenso i wonder if this is a hardware difference with m3 or if we just have a subtle bug in hv that only gets hit because m3 speculates much more or something like that
#asahi-dev · 2026-07-13 18:04
sventhough i guess much more stuff would explode if that was wrong
#asahi-dev · 2026-07-13 18:04
svenhrm, wasn't that 24MHz vs. 1 GHz counter thing first on m3? do we initialize those apple regs correctly?
#asahi-dev · 2026-07-13 17:55
sveni looked through the hv code a few days ago and the time stealing/accounting seemed okay to me. maybe it's time to take another look
#asahi-dev · 2026-07-13 05:58
sven:(
#asahi-dev · 2026-07-12 17:03
svengot an idea for a better name? :)
#asahi-dev · 2026-07-12 13:27
sven\o/
#asahi-dev · 2026-07-12 11:35
svenas i said, i'd love to know what the actual bill would be if this was priced at regular end-user prices
#asahi-dev · 2026-07-12 11:34
sven:D
#asahi-dev · 2026-07-12 11:27
sveni'd say half of the "review" i got was nonsense and the other half was fine
#asahi-dev · 2026-07-12 11:26
sveni wonder what their bill would be if this wasn't sponsored by google :D
#asahi-dev · 2026-07-12 11:26
sveni ran that bot locally on that psci series yesterday. it burned 50$ or so in tokens, the review was okay though
#asahi-dev · 2026-07-12 11:02
svenhttps://git.kernel.org/pub/scm/linux/kernel/git/sven/linux.git/log/?h=efi-psci probably good enough for v2, note that the table format changed and needs the latest m1n1 branch as well
#asahi-dev · 2026-07-11 22:23
svengreat, thanks
#asahi-dev · 2026-07-11 22:23
svenmaybe the rtc one is missing as well
#asahi-dev · 2026-07-11 22:22
svenhttps://lore.kernel.org/asahi/20251112-macsmc-subdevs-v5-11-728e4b91fe81@gmail.com/ that one

plus ›