#asahi-dev · 2023-05-05 09:48
marcanfor macOS in m1n1 I set it to some random (maybe) constant#asahi-dev · 2023-05-05 09:48
marcanAIUI VMKEY* is a randomizer key mixed in so that different VMs have different PAC hashes, but it should be completely harmless to set it to any arbitrary (consistent) value.#asahi-dev · 2023-05-05 09:47
marcanmaz: that's for PAC, what are you thinking of?#asahi-dev · 2023-05-05 03:48
marcansven: fyi, someone with a broken 10Gbps USB3 device: https://www.reddit.com/r/AsahiLinux/comments/134t1rl/10gbps_usb_cable_support_missingproblematic/#asahi-dev · 2023-05-05 03:44
marcanmight not have the same hierarchy there, or not get stuck if powered up in the wrong order#asahi-dev · 2023-05-05 03:40
marcanshould make the pmgr_adt_clocks_enable work properly now#asahi-dev · 2023-05-05 03:40
marcan(untested but eh)#asahi-dev · 2023-05-05 03:40
marcaneiln: pushed a thing, please try it#asahi-dev · 2023-05-05 03:38
marcanit tries to power up devices before their parents#asahi-dev · 2023-05-05 03:38
marcanok, I just realized pmgr.c is broken :p#asahi-dev · 2023-05-05 03:34
marcanthe 0 is what matters, the other flags have specific meanings. b would include PARENT_OFF which is your hint that something is wrong there.#asahi-dev · 2023-05-05 03:31
marcaneiln: 10f means the intended mode is f but the actual mode is 0, which usually happens when a parent power domain is not turned on or something else is causing the domain to be down for some other reason#asahi-dev · 2023-05-04 19:29
marcanthat's what it's called though#asahi-dev · 2023-05-04 19:29
marcanbeats me#asahi-dev · 2023-05-04 19:17
marcansome of those chicken bit names are fun#asahi-dev · 2023-05-04 19:17
marcanat least today's distraction had me find more stuff :p#asahi-dev · 2023-05-04 19:16
marcansven, maz: https://github.com/AsahiLinux/m1n1/commit/938e6d4c897e6c83dee5122fe0aafc0e20289e8f#asahi-dev · 2023-05-04 15:41
marcanpushed to asahi-dev#asahi-dev · 2023-05-04 15:39
marcanpushing a new m1n1 now with that#asahi-dev · 2023-05-04 15:39
marcan(tested on linux)#asahi-dev · 2023-05-04 15:39
marcanmaz: I give up, but setting the magic reg to 2 fixes it so shrug#asahi-dev · 2023-05-04 14:24
marcanyeah, what I'm trying to figure out is whether the hypervisor pokes it (which would answer the question) or whether we screwed something else up.#asahi-dev · 2023-05-04 14:20
marcanso there is *some* bug but it's not our problem#asahi-dev · 2023-05-04 14:20
marcanmaz: ok no, it only enables the workaround on dev machines by default as far as I can tell, and I see the same behavior on ecores anyway.#asahi-dev · 2023-05-04 14:08
marcanlovely#asahi-dev · 2023-05-04 14:08
marcanthere's a chicken kernel arg and some special handling here, and it only applies to pcores#asahi-dev · 2023-05-04 14:07
marcanmaz: I'm staring at the kernel and this looks like an errata on t600x...#asahi-dev · 2023-05-04 13:28
marcananother possiblity is that this is an intentional mechanism so that the extra HV IRQ latency is considered in the "pick a CPU" heuristic, and the HV is supposed to manually ack the low-level IRQ in some way with that bit clear#asahi-dev · 2023-05-04 13:26
marcanis my hypothesis#asahi-dev · 2023-05-04 13:26
marcanso the first IRQ arrives fine, the next one is bork#asahi-dev · 2023-05-04 13:26
marcanwhich means when the *next* IRQ comes in, until this thing times out, it doesn't get delivered#asahi-dev · 2023-05-04 13:26
marcanI'm not sure how this causes breakage, but for example I wouldn't be surprised if this machinery running is blocking#asahi-dev · 2023-05-04 13:25
marcanbut it looks like what fails to ack here isn't the IRQ itself, it's the lower level mechanism that picks a CPU to interrupt#asahi-dev · 2023-05-04 13:25
marcanthe ack has the same latency in both cases (I'm grabbing the counter right before triggering the IRQ and right after acking it in the EL2 IRQ handler that fired from EL1 context)#asahi-dev · 2023-05-04 13:23
marcanbet it changes#asahi-dev · 2023-05-04 13:23
marcanmacOS sets magic_reg = 0 on normal boots, but who knows what it does with virtualization#asahi-dev · 2023-05-04 13:22
marcansooo... m1n1 fix.#asahi-dev · 2023-05-04 13:22
marcanturns out magic_reg = 2 makes everything work#asahi-dev · 2023-05-04 13:22
marcanmagic_reg = 3 is the boot value we know doesn't work#asahi-dev · 2023-05-04 13:22
marcanthat's with magic_reg = 0#asahi-dev · 2023-05-04 13:22
marcanit's as if the "delivered to CPU core" signal never gets back to AIC even though it has#asahi-dev · 2023-05-04 13:21
marcanI don't know *why* it's broken, but the symptoms seem to be that the IRQ gets delivered but AIC somehow thinks it isn't, even after it gets acked, and ends up timing out and also delivering to some other CPU#asahi-dev · 2023-05-04 13:21
marcanmaz: aaand it's the impdef register#asahi-dev · 2023-05-04 13:10
marcanmaz: m1n1, but this is weird.#asahi-dev · 2023-05-04 13:10
marcankettenis: not yet#asahi-dev · 2023-05-04 13:07
marcanthe SRAM bypasses that#asahi-dev · 2023-05-04 13:06
marcanand passing through DART mappings is a world of pain (see DCP)#asahi-dev · 2023-05-04 13:06
marcanno, because they go through a DART#asahi-dev · 2023-05-04 13:01
marcanactually no, the real latency looks small?#asahi-dev · 2023-05-04 12:53
marcanmaz: IRQs do kick us out of the guest but I think the latency is total crap. I suspect an IMPDEF to control that...