#asahi-dev · 2022-04-12 18:01
svenor enable debug prints in rtkit and see where it gets stuck#asahi-dev · 2022-04-12 17:56
svenbut dunno why ANS fails to boot then#asahi-dev · 2022-04-12 17:56
svenhrm, that annoying mailbox atomic thing breaks that threaded irq hack to get around that work thread arnd suggested for rtkit I think :/#asahi-dev · 2022-04-12 17:52
svenoh... ugh.#asahi-dev · 2022-04-12 17:51
svenbut i wonder why. i should've already seen those for nvme#asahi-dev · 2022-04-12 17:50
svenit's probably caused by removing that worker thread#asahi-dev · 2022-04-12 17:49
svencan you paste the dmesg?#asahi-dev · 2022-04-12 17:49
svenhuh#asahi-dev · 2022-04-12 17:18
svenyou probably want the new SART as well since iirc I changed a function name there#asahi-dev · 2022-04-12 17:18
svenoh, right. you need to somehow get rid of the old nvme bits first#asahi-dev · 2022-04-12 16:26
svendid anyone get a chance to see if the rtkit changes in https://github.com/AsahiLinux/linux/tree/nvme-v2 still work with dcp, etc.?#asahi-dev · 2022-04-12 11:33
svene.g. Some new i2c driver I know nothing about because I added the apple/pasemi one to the i2c kconfig/makefile #asahi-dev · 2022-04-12 11:33
svenif it’s anything like my inbox more than half of that is random LKML series that happen to get CCed to because I touched some file :D#asahi-dev · 2022-04-11 11:22
svenyay, nvmem (not to be confused with NVMe) which was even more boring than watchdog got merged :D#asahi-dev · 2022-04-10 14:09
svenmaybe it's hardcoded in the kext :/#asahi-dev · 2022-04-09 10:38
svenso the solution is to make that weird case an explicit opt-in. That’s essentially what my patch does, and then dma-iommu uses that opt in#asahi-dev · 2022-04-09 10:37
svenit’s the same for the iommu api: clients do get access to the iommu granule but they’ll likely make assumptions that are no longer true in our case#asahi-dev · 2022-04-09 10:37
svenrqou_: the problem really is that client/userspace drivers won’t expect that weird page size mismatch #asahi-dev · 2022-04-09 07:17
svenwhere work probably means “will crash somewhere”#asahi-dev · 2022-04-09 07:16
sventhe scary patch to make vfio work is to just add that iommu large page whatever bit to the define for a non-dma-iommu domain#asahi-dev · 2022-04-09 07:15
svenbut I really just know that vfio exists and roughly what it does :D#asahi-dev · 2022-04-09 07:15
svenhm, I’d have to actually understand vfio and see what’s up with that#asahi-dev · 2022-04-09 07:14
svenyes, and hopefully by shipping 16k kernels people start fixing their code#asahi-dev · 2022-04-09 07:13
sven(Or apply a scary patch/config options)#asahi-dev · 2022-04-09 07:13
svenIf you want something special like vfio you’re an enthusiast and can just switch to 16k kernels 🤷🏻♂️#asahi-dev · 2022-04-09 07:12
svendma-iommu makes sense to allow distro installers to boot and for stuff like box64/fex#asahi-dev · 2022-04-09 07:12
svenOr just not support it at all :D#asahi-dev · 2022-04-09 07:11
sven*behind#asahi-dev · 2022-04-09 07:11
svenI’d at least hide that case between an explicit opt-in#asahi-dev · 2022-04-09 07:11
svenright, the same is true for the raw iommu api but I’m still sure lots of random things will break#asahi-dev · 2022-04-09 07:09
svenand then it’s a user space api so who knows what people do with it#asahi-dev · 2022-04-09 07:08
sventhat could also be meant for iommu < cpu or for large page support and all that#asahi-dev · 2022-04-09 07:08
svenyou’d have to check if anyone even looks into that and handles the iommu > cpu case#asahi-dev · 2022-04-09 07:06
svenI don’t know the api well enough#asahi-dev · 2022-04-09 07:05
sventhat’s easy enough for dma-iommu but gets annoying for everything that uses the raw iommu api#asahi-dev · 2022-04-09 07:04
svenyou’d have to audit all the code to make sure nothing makes the implicit iommu page size = cpu page size assumption#asahi-dev · 2022-04-09 06:01
svenrqou_: 4k kernels will never work with vfio (or anything else that uses the iommu api directly instead of going through dma-iommu)#asahi-dev · 2022-04-07 17:57
svenright now i just blindly copy/pasted whatever pciehp_configure_device does#asahi-dev · 2022-04-07 15:33
sventhe "tell the pci subsystem to re-scan" is a big hack right now but seems to work. let's hope thunderbolt is just the same: https://f.svpe.de/7c144fb92e09845e75b4cd9d8e1e63a336217fe28e2a2e86e061c3fc0eea6583_pcie-hotplug.txt#asahi-dev · 2022-04-07 15:32
svenlooks like pcie hotplug is actually pretty simple: when a LINK_UP interrupt is received tell the pci subsystem to re-scan, when LINK_DOWN is received remove the devices and finally poke that LSSMCTL bit again to be able to catch the next LINK_UP#asahi-dev · 2022-04-07 13:57
svenI think it should, I remember seeing some of_ code that just tried walking up to the root to look for dma-coherent#asahi-dev · 2022-04-07 13:55
svenyeah, agreed#asahi-dev · 2022-04-07 13:20
sventrue#asahi-dev · 2022-04-07 13:11
svenbut let me check that again because it's been a while#asahi-dev · 2022-04-07 13:11
svenlast time I looked into this I convinced myself that for devices with an iommu those would just be normal memory#asahi-dev · 2022-04-07 13:09
svenbut let me check again#asahi-dev · 2022-04-07 13:09
svenat least for dma_alloc_coherent buffers it shouldn't do any cache maintenance #asahi-dev · 2022-04-07 13:07
svenyes, but dunno if a setup like that would make sense#asahi-dev · 2022-04-07 11:02
svenunless the cache somehow snoops those DART transactions I guess#asahi-dev · 2022-04-07 11:02
svenhrm... if that bit is indeed uncachable but the same page is mapped as normal memory for the CPU shouldn't that break horribly?