#
#asahi-re · 2026-03-27 00:43
scottjgPCR = kIOMapPostedCombinedReordered (macOS)
#asahi-re · 2026-03-27 00:43
scottjgPost = kIOMapPostedWrite (macOS)
#asahi-re · 2026-03-27 00:43
scottjgDflt = kIOMapDefaultCache (macOS)
#asahi-re · 2026-03-27 00:43
scottjgWC = ioremap_wc / kIOMapWriteCombineCache
#asahi-re · 2026-03-27 00:43
scottjgInhib = ioremap / kIOMapInhibitCache
#asahi-re · 2026-03-27 00:43
scottjg--------------------------------------------------------
#asahi-re · 2026-03-27 00:43
scottjg VFIOUserHostApp
#asahi-re · 2026-03-27 00:43
scottjgM2 Mac mini 8M 4 22 427 46 46 418
#asahi-re · 2026-03-27 00:43
scottjg VFIOUserHostApp
#asahi-re · 2026-03-27 00:43
scottjgM4 MacBook Air 8M 4 46 391 46 46 407
#asahi-re · 2026-03-27 00:43
scottjgMachine Win Pass Inhib WC Dflt Post PCR
#asahi-re · 2026-03-27 00:43
scottjg Linux pci-cache-probe.ko
#asahi-re · 2026-03-27 00:43
scottjg--------------------------------------------------------
#asahi-re · 2026-03-27 00:43
scottjg2018 Mac mini 16M 8 49 372 - - -
#asahi-re · 2026-03-27 00:43
scottjgPCI BAR1 Sequential Write Benchmark (MiB/s)
#asahi-re · 2026-03-26 21:27
scottjgfwiw the performance of writing to the BAR when you map it in writecombine mode is almost exactly the same on x86 vs m4
#asahi-re · 2026-03-26 21:20
scottjgi'm trying to get a baseline for what the performance is on x86 since egpu is known to work on x86 linux
#asahi-re · 2026-03-26 21:20
chaos_princessthose have almost no ip blocks in common
#asahi-re · 2026-03-26 21:20
chaos_princesswhy are you comparing an intel mac to an arm one?
#asahi-re · 2026-03-26 21:20
scottjgmy early tests seem to indicate that the performance of writing to the larger BAR on the egpu with a 2018 mac mini has similar performance to my m4, i'm still trying to get the test working on my m1 to see if it's slower to prove that something actually changed
#asahi-re · 2026-03-26 21:18
scottjgi'm still collecting data... i have an m1 air and and m4 air, if i find something interesting, i think the next things i'd ask for help is if anyone has an m2 or m3 based machine with macos they can run some tests on
#asahi-re · 2026-03-26 18:39
SpiritWolf_If anyone has anything I can help with, be happy to. I have an m4 pro macbook
#asahi-re · 2026-03-25 03:32
scottjgthat's on my m4 macbook air. it seems like WriteCombine might be supported now? if i'm interpreting the results correctly...
#asahi-re · 2026-03-25 03:32
scottjg"benchmark-result" = "BAR1 bytes=0x800000 passes=4 def->Default(0x0) 690193750ns 46MiB/s WC->WriteCombine(0x400) 85862875ns 372MiB/s PW->PostedWrite(0x600) 689997083ns 46MiB/s PCR->PostedCombinedReord(0x900) 89610208ns 357MiB/s"
#asahi-re · 2026-03-25 03:32
scottjggot a kext going that maps BAR1 in different modes to see if they do anything:
#asahi-re · 2026-03-25 00:15
scottjgmaybe something on the macos host in `ioreg`?
#asahi-re · 2026-03-25 00:10
jannauI don't think looking at the tbt wire signals will tell anything. this should all discoverable from the system
#asahi-re · 2026-03-25 00:08
scottjgthere's basically two patches i have on the driver, one is a "dma shim" that sends dma mapping calls to the host... and there was this other issue where if it wants to use a 2MB aligned page for performance and asserts if you get an unaligned iova back from dma map. i just basically just made it use 4k pages
#asahi-re · 2026-03-25 00:07
scottjgthis is the proper nvidia "open" driver
#asahi-re · 2026-03-25 00:07
jannauis this nouveau or prop nvidia driver? The latter is well behaved. it works in m2 ultra mac pro to some degree with light patching. Main issue for native linux is 16K pages though
#asahi-re · 2026-03-25 00:07
scottjgshort of getting a scope on the thunderbolt cable, is there a straightforward way to test and see if it maybe has?
#asahi-re · 2026-03-25 00:04
jannauI don't think anyone has looked closely a pcie/thunderbolt beyond m1/m2 so it's possible that things changed
#asahi-re · 2026-03-25 00:00
scottjgthis would also explain why there's a 25s soft lockup when the X session initializes
#asahi-re · 2026-03-24 23:58
JamesCalligeros[m]yeah i mean at the end of the day, the question is always why not :P
#asahi-re · 2026-03-24 23:57
scottjgoh well. maybe it'll be a funny blog post at least.
#asahi-re · 2026-03-24 23:52
JamesCalligeros[m]some stuff may work, some stuff may not, everything will be slow, and you will probably explode the kernel more than once
#asahi-re · 2026-03-24 23:51
JamesCalligeros[m]its basically just undefined behaviour. the linux gpu drivers for the RGB mob are largely built assuming they can do write combining and reordering
#asahi-re · 2026-03-24 23:49
scottjgi wonder if in practice it might not be a huge deal? like for ai inference there's not a ton of bandwidth needed after the model is loaded. it seems to perform ok at that point. not sure what games do.. maybe it just becomes a lot slower to load textures when the games start?
#asahi-re · 2026-03-24 23:48
scottjgoh ok, so that's gonna really hurt the perf
#asahi-re · 2026-03-24 23:43
JamesCalligeros[m]iirc the pcie controller can only map Device-nGnRE or Device-nGnRnE
#asahi-re · 2026-03-24 23:31
scottjg the pcidriverkit apis, not mapping BARs directly). i'm mainly trying to understand at the system level what the restrictions are that might make this impractical?
#asahi-re · 2026-03-24 23:31
scottjg map the thunderbolt memory on apple silicon and i was wondering if anyone knew more about that? the main issue i run into now is host os restrictions (i can't map more than 1.5gb because of os enforced limits, can't control dma map alignment because of OS library interfaces), but that doesn't seem like a hardware restriction per-say. mmios are also very slow, but that seems like an issue with my prototype (i proxy the writes to
#asahi-re · 2026-03-24 23:31
scottjgthis isn't exactly specific to asahi, but it's apple silicon reverse engineering question. hope that's ok. i've been working on a prototype that can do some limited form of pci passthrough for a thunderbolt device on a macos host with a linux guest on qemu. so far i have the basics working on my m4 macbook air (see: https://imgur.com/a/li7j7wm ). in the past i had seen marcan say that there was some issue with being able to
#asahi-re · 2026-03-22 10:17
chaos_princessyou probably do not need all of them, as that command line lights up every single debug path inside the pmgr driver
#asahi-re · 2026-03-22 10:15
noopwafeleither way this solves (in practice) my problem so thankyou <3
#asahi-re · 2026-03-22 10:15
chaos_princessit is either that or -disable_mtx_chk
#asahi-re · 2026-03-22 10:14
jannaumaybe one of the pmgr-debug* bits disabled the assert or increased the timeout
#asahi-re · 2026-03-22 10:13
noopwafelthat is with a tracer enabled, so probably valid for it to complain, but that is not the usual failure, and based on the log maybe I can workaround that by disabling idle somehow..
#asahi-re · 2026-03-22 10:11
noopwafeltried a couple more times and got a Lock failure in _cpuIdle : https://noopwafel.net/asahi/m3-pmgr-log-panic.txt
#asahi-re · 2026-03-22 10:09
chaos_princessdo you also have the crash from before?

plus ›