#asahi · 2021-09-21 10:54
mazthanks. let me get on that.#asahi · 2021-09-21 10:49
mazkettenis: huh, I may have missed tons of emails (just came back from holiday...).#asahi · 2021-09-21 10:42
mazsven: yup, that fixes it. do you want me to put that in a patch with your name on it?#asahi · 2021-09-21 07:48
mazmarcan: huh... that's... creative.#asahi · 2021-09-21 07:22
mazmarcan: odd. SError is actually specified as edge.#asahi · 2021-09-20 08:15
mazsven: https://paste.debian.net/1212452/#asahi · 2021-09-02 17:49
mazmarcan: this looks a bit like the voting system that most qualcomm SoCs implement (you can vote on the power state of a block, and the HW aggregates the votes to satisfy the independent requirements within the physical constraints).#asahi · 2021-09-02 17:31
mazwhich*#asahi · 2021-09-02 17:31
mazwuich is really fun for VMs that have their memory on top of that precise address...#asahi · 2021-09-02 17:30
mazeffectively, yes. it is a black hole in the IOVA, and never reaches the IOMMU.#asahi · 2021-09-02 17:29
mazj_ey: the only other case we have of this is the "quality" implementations of the ITS by HiSi (D03/D05/D06).#asahi · 2021-09-02 17:28
mazj_ey: the usual system architecture on ARM is that the MSI doorbell is translated by the SMMU, which avoids this kind of horror.#asahi · 2021-09-02 17:28
mazj_ey: because funnily enough, not translating the MSI doorbell is an x86-ism.#asahi · 2021-09-02 17:22
maznot pretty, but does the trick.#asahi · 2021-09-02 17:22
mazsven: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?h=hack/m1-pcie-v3&id=c2cb02ca7d7069dda25535207de23a53fbc3064e#asahi · 2021-09-02 09:14
mazI'll dig into that shortly.#asahi · 2021-09-02 09:14
mazsven: I think we need to implement something similar for the dart driver.#asahi · 2021-09-02 09:02
mazkettenis_: cheating is always good! :)#asahi · 2021-09-02 08:30
mazsven: that's what I thought. I seem to remember there was something to exclude some MSI ranges because HiSilicon messed up their SMMU across several generations. Time to poke Robin...#asahi · 2021-09-02 08:25
maz(I fear I know the answer to that question)#asahi · 2021-09-02 08:24
mazso what guarantees that we never provide an endpoint with the MSI doorbell as something to DMA from/to?#asahi · 2021-09-02 08:23
mazsven: do PCI devices see IOVAs in the low 4GB range? I seem to remember they do, right?#asahi · 2021-08-31 15:59
mazkettenis_: huh, I sort of missed that. I guess that comes with the territory... :-/#asahi · 2021-08-31 14:35
mazsven: marcan: awesome, thanks. I'll have a couple of weeks to write something (the joy of a rainy holiday in the UK).#asahi · 2021-08-31 14:33
mazgimegimegime!!!!!#asahi · 2021-08-31 14:31
mazI remember asking this before, but obviously cannot remember the answer: what's the plan for kicking the firestorm CPUs into decent frequencies? I guess this would involve mailbox communication with another core somewhere?#asahi · 2021-08-31 13:49
mazmarcan: as long as it isn't 'Asahi MacOS', anything goes.#asahi · 2021-08-27 08:50
mazj_ey: damn! jpb knew about that!#asahi · 2021-08-27 08:44
mazj_ey: Ard has a patch fixing that on the edk2 list.#asahi · 2021-08-27 08:44
mazj_ey: yeah, that. stupidest idea ever, together with the almost equivalent code on the v2 side (which can result in a deadlock).#asahi · 2021-08-27 08:42
mazmarcan: my current test case is EFI and a few hacked up KVM unit-tests. but it should be pretty easy to reproduce by writing stupid values to ICC_EOI1R_EL1 from the guest, which is what EFI does...#asahi · 2021-08-27 08:39
mazmarcan: FYI, the current state of the vGIC SError mitigation: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?h=hack/m1-pcie-v2&id=ff6dfef9c2b901033b6e88b8683c57fb03cb09f9#asahi · 2021-08-24 16:25
mazj_ey: robin and cookies? GF cookies, maybe...#asahi · 2021-08-23 18:11
mazalyssa: writing a full blown hypervisor is similar to writing a CPU. I guess this satisfies my HW inclination enough that I don't have to write any RTL...#asahi · 2021-08-23 18:07
mazalyssa: I only spent 10 years of my life writing KVM for arm64. no big deal.#asahi · 2021-08-23 18:01
mazI wonder if Apple hired the same HW designer who fscked it up the first time.#asahi · 2021-08-23 17:49
mazmarcan: the SError seems to be triggered by this sorry excuse for a vGIC. thankfully, we can repurpose the ThunderX hacks, which seem to do a reasonable job at hiding the HW issues.#asahi · 2021-08-23 13:20
mazmarcan: yup, which is why I'm thinking of TLBs.#asahi · 2021-08-23 13:19
mazalyssa: I did notice, but I doubt there is anything HW-dependent behind this address.#asahi · 2021-08-23 13:18
mazmarcan: yup, that's what I thought. the ESR always has the same IMPDEF value 0xbf40100a. it triggers exactly once per VM boot (every time the guest reboots as well).#asahi · 2021-08-23 13:17
mazkettenis: that'd be great.#asahi · 2021-08-23 13:16
mazkettenis: cool, thanks for that.#asahi · 2021-08-23 13:15
mazsven: marcan: https://paste.debian.net/1208692/#asahi · 2021-08-23 13:15
mazkettenis: it didn't look too bad last time I checked. at least, that's a (semi) universal way of describing a range.#asahi · 2021-08-23 13:14
mazalyssa: it look OK. I'm respining the MSI side of it.#asahi · 2021-08-23 13:03
mazs/or/it/#asahi · 2021-08-23 13:03
mazsven: thanks, I'll give that a go and see what or reports (though that will probably be just more random numbers we can't make sense of).#asahi · 2021-08-23 13:01
mazmarcan: or TLBs.#asahi · 2021-08-23 13:00
mazmarcan: I suspect that it happens at the point where we turn the MMU off between the EFI stub and the kernel proper.#asahi · 2021-08-23 12:58
mazmarcan: I can trigger one almost at will from a KVM guest: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?h=hack/m1-pcie-v2&id=2c9981b6a289354c22989e70cef0e51b9e632091