#
✕ nick:marcan
#asahi · 2022-06-19 07:23
marcanI really need to reverse engineer that AMCC error handler stuff, it'd be very useful
#asahi · 2022-06-19 07:22
marcanheh
#asahi · 2022-06-19 07:22
marcanyeah, it's just still posting behind the scenes which seems a bit odd
#asahi · 2022-06-19 07:21
marcannot sure how nGnRnE is supposed to actually work since PCIe writes are posted, but at least the fabric does not complain
#asahi · 2022-06-19 07:20
marcannGnRnE and nGnRE both work for PCIe BARs
#asahi · 2022-06-19 07:20
marcanpresumably RO=reorder
#asahi · 2022-06-19 07:20
marcanpanic(cpu 0 caller 0xfffffe0013443760): "AMCC PLANE3 PIO request with RO flag set error: INTSTS 0x0000000000400000 AFERRLOG0/1/2/3 0x101000/0x17f1406/0x2000000/0x40001 ADDR 0x600101000 CMD/SIZE/TYPE 0x14(CifNCWr)/0x7f/0x1 AID/TID 0x10/0" @AppleT8101PlatformErrorHandler.cpp:1323
#asahi · 2022-06-19 07:20
marcannope, does not work, and in fact you get a nice AMCC panic from macOS
#asahi · 2022-06-19 07:05
marcanstill need to test that normal-NC really does not work
#asahi · 2022-06-19 07:01
marcanwhich you're part of :-)
#asahi · 2022-06-19 06:58
marcanhttps://patchwork.kernel.org/project/linux-arm-kernel/patch/20210429162906.32742-2-sdonthineni@nvidia.com/ relevant discussion that agrees with what I'm saying :p
#asahi · 2022-06-19 06:55
marcanyeah, this isn't about framebuffers, those end up being driver-managed; it's about things like texture buffers, VBOs, etc.
#asahi · 2022-06-19 06:52
marcan(DisplayLink is not a GPU, it's a display controller)
#asahi · 2022-06-19 06:52
marcando USB GPUs exist, besides that abomination Lina is working on?
#asahi · 2022-06-19 06:51
marcanI think every GPU driver allows that?
#asahi · 2022-06-19 06:49
marcanthere is no way unaligned emulation will perform well when literally memcpy hits it
#asahi · 2022-06-19 06:48
marcanthat's why we can't just fix this in drivers
#asahi · 2022-06-19 06:48
marcane.g. memcpy will often do unaligned accesses for performance
#asahi · 2022-06-19 06:48
marcanit's up to individual applications, not nvidia's userland code
#asahi · 2022-06-19 06:44
marcanwhich some userland does
#asahi · 2022-06-19 06:44
marcanthat won't work with userland that tries to make unaligned accesses to VRAM
#asahi · 2022-06-19 06:03
marcanyes
#asahi · 2022-06-19 05:51
marcan(Normal-NC would make eGPUs work sanely)
#asahi · 2022-06-19 05:51
marcan()
#asahi · 2022-06-19 05:50
marcanmight do it a bit later
#asahi · 2022-06-19 05:50
marcanI'm not holding my breath but it's worth checking
#asahi · 2022-06-19 05:49
marcanwe've never tried Normal-NC, just Normal
#asahi · 2022-06-19 05:49
marcanI just looked up the ARM spec for PCIe integration, and it says Normal-NC is allowed (but not Normal)
#asahi · 2022-06-19 05:49
marcanI think we actually have yet to still 100% validate that this is not supported for PCIe with any memory type other than Device-nGnRE
#asahi · 2022-06-19 05:45
marcanthe workaround you'd have to do to make it work impacts performance
#asahi · 2022-06-19 05:43
marcanthat too
#asahi · 2022-06-19 05:43
marcanthey *could* make it like x86 to make this work, but it not being like x86 isn't a bug
#asahi · 2022-06-19 05:43
marcanit's not a "bug", it's software and hardware assuming everything is like x86
#asahi · 2022-06-19 05:42
marcanthis isn't unique to the M1, it's the same on may other ARM systems
#asahi · 2022-06-19 05:07
marcan*involves
#asahi · 2022-06-19 05:07
marcanif you have something more niche you can just work around the problem in the driver/app much more easily
#asahi · 2022-06-19 05:07
marcanGPUs are really the only device where this is exposed to a huge variety of applications
#asahi · 2022-06-19 05:06
marcanbut the problem with GPUs is that making them work "properly" the sane way involved potentially modifying every app/game
#asahi · 2022-06-19 05:06
marcanpotentially weird GPU-like things (like FPGA boards with lots of onboard RAM) could
#asahi · 2022-06-19 05:05
marcannot to my knowledge
#asahi · 2022-06-19 04:09
marcanmostly just completing unaligned r/w support to make it work
#asahi · 2022-06-19 04:09
marcanwould be trivial to test that with the m1n1 hypervisor once thunderbolt/pcie stuff is in asahi if someone wants to find out just how bad it would be
#asahi · 2022-06-19 04:07
marcanlike 100x slower bandwidth than native VRAM accesses bad
#asahi · 2022-06-19 04:07
marcantechnically with a VM you could hook all BAR accesses and make it "work" with no changes to the guest, but performance would be hilariously bad
#asahi · 2022-06-19 04:06
marcanVMs don't change any of that (the guest still needs the same driver changes)
#asahi · 2022-06-19 04:03
marcanand you'd still end up with pathologically bad performance for some workloads
#asahi · 2022-06-19 04:03
marcanlikely needs userspace mesa changes too
#asahi · 2022-06-19 04:03
marcanso you'd have to find someone well versed in graphics and they'd likely have to spend months working on it, for each GPU driver/vendor, and then everything needs to be upstreamed, and upstream might not like the (rather intrusive) changes it brings
#asahi · 2022-06-19 04:02
marcanit's technically possible to make eGPUs work (with performance limitations) on M1 devices, but it's like a whole driver refactoring/development project to pull it off in a way that can work
#asahi · 2022-06-19 04:00
marcanah, that link is only about paravirt graphics, not passthrough

plus ›