Engineer passes an RTX 5090 into an ARM64 Linux VM on an M4 MacBook Air via Thunderbolt eGPU and custom QEMU patches to run CUDA and games.
Key Takeaways
macOS ships no NVIDIA or AMD GPU drivers for Apple Silicon, forcing a Linux VM passthrough path instead of native use.
Thunderbolt tunnels PCIe over USB-C (4 lanes, 40Gbps on TB4); the GPU appears as a PCIe device but with tunneling overhead.
Direct BAR memory mapping into the Hypervisor.framework VM caused kernel panics; the fix was removing HV_MEMORY_EXEC from the mapping flags, but BAR writes are still ~10x slower than native due to ARM nGnRnE memory type constraints.
Apple Silicon’s DART DMA unit enforces a ~1.5GB mapping limit and ~64k mapping cap, blocking naive GPU passthrough; the author built a custom apple-dma-pci QEMU device and guest kernel driver to intercept NVIDIA DMA ops and work within the constraint.
tinygrad’s open-source macOS eGPU driver exists but is ~10x slower than native Metal inference and only works within the tinygrad stack, not for games or general CUDA.
Hacker News Comment Review
Commenters are excited about CUDA on Apple Silicon as a practical AI inference path, especially for Mac Mini users with existing NVIDIA hardware, though App Store approval is a real blocker.
The x86 emulation layer (via tools like Valve’s Proton work on Steam Deck) is understood as necessary because Windows games rarely ship ARM builds, not a fundamental architecture mismatch.
There is frustration that macOS deliberately omits driver support for the full eGPU stack, with commenters framing Linux-on-Apple-Silicon (Asahi) as the cleaner long-term path.
Notable Comments
@bigyabai: frames macOS’s missing driver stack as an argument for Asahi Linux over macOS for GPU-heavy workloads.