freenode
Kernel & Low-Level

Claude-written mlx5 driver proposed for Linux VFIO selftests

Jason Gunthorpe says an AI produced a ConnectX selftest driver in days that once took months of human work.

Jason Gunthorpe has posted a ten-patch series that adds Mellanox/NVIDIA mlx5 (ConnectX) support to the Linux kernel's VFIO PCI selftest framework, and he says the bulk of it was written by Anthropic's Claude in roughly four days.

VFIO selftests need real device drivers in userspace so automated tests can exercise DMA, IOMMU mapping, and MSI delivery against actual hardware rather than mocks. The new mlx5 driver programs ConnectX VFs and PFs through the command interface, boots the HCA, and uses an RDMA reliable-connection queue pair in force-loopback mode. RDMA WRITE completions effectively become DMA memory copies, with optional MSI-X raised from completion events. Gunthorpe says the stable mlx5 programming ABI should cover cards from ConnectX-5 through current silicon, provided firmware supports QP loopback.

Most of the code is device bring-up: command queues, page management, event queues, protection domains, and memory keys. The data path is comparatively small. Supporting a physical function as well as VFs was, he notes, surprisingly hard.

The process is the larger story. Gunthorpe reports about 4.5 million output tokens across roughly thirty Claude sessions and thousands of lines of AI-produced planning notes, followed by substantial human cleanup he calls "de-slopping." Earlier VFIO selftest drivers took on the order of one to two months; finishing one in a week is, in his words, "pretty remarkable." Patches carry Assisted-by tags for Claude Opus. David Matlack reviewed or acked several pieces.

If merged, the series gives kernel CI and developers a first-class path to regression-test VFIO and IOMMU behavior on widely deployed ConnectX hardware, and it is an early public data point on large language models producing nontrivial Linux driver code that still needs expert curation before it is presentable upstream.