From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBE07478842; Mon, 28 Sep 2026 22:28:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.144 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790634529; cv=none; b=S2IrNwYuk30dJnJVnF87XANOjo4jc1iYUeRbcDxup7pq6vOexPJF/J4alGggLG4F9GRVO4x+zzRQtnUHO1KKkjzeWd6deXRIMBT382zMJsCpxriXRB/AoN4r6lk7nrCSpBWK2QvWS9xFGdfQScGv9pG/roMmNqjaQ3+21ip/Lws= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790634529; c=relaxed/simple; bh=6w98JnFuqLQ7swHNEd357ROn9GLTXPPxfoytR/6X2d8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oSsQa2rAArffSCesnvvA0HdN1PiUyeEe44sIjBl2vduZYgX1NJQbpV1YvNyTYLChSh2hM187y/O4dayy462hXoCIzCx/P2zS9O0OFt4bU9WvVgNh0aXPRWYTiIcxU9DcBsxNYK9HHyDzB6Jb0+Xe+DeGjTAy2zYfOQOIvqPVTcs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shazbot.org; spf=pass smtp.mailfrom=shazbot.org; dkim=pass (2048-bit key) header.d=shazbot.org header.i=@shazbot.org header.b=j3wTQjhT; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=EWj7Cksj; arc=none smtp.client-ip=202.12.124.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shazbot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shazbot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shazbot.org header.i=@shazbot.org header.b="j3wTQjhT"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="EWj7Cksj" Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 7BE121D000F5; Mon, 28 Sep 2026 18:28:43 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Mon, 28 Sep 2026 18:28:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shazbot.org; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1790634523; x=1790720923; bh=9MPDcqcdVPxLHwAEsIz514gjGwXbAqqJQTEEaOtjMO4=; b= j3wTQjhTxx52qxsu1bMl9sKoMbMl1BZnN2+NpHHsZ1BT1YX0ehYUiK+LN6iVE063 3S1nhAJxVe83MoBpHjPj7GgMuckze7YcDr2ou8eq5SZUFeiHo2cDGZrWmryik7Ug 2GcUmh10FNCI9nPAXfwliw/MwL7C9munsoXET0YAyTaSrxtuLCudZPGVk/ljg9eF Fg4Md0EtUhzkvATPsRMG1STwkbwXdVoycpy2lwQUmixG/wWvuHRsUCUGdzaI99Rb ljr75nX+RM5LGjZ4kqxe59u5FVZVGUxh+yDSJ3rdZgbZr9XO9gRY/gwKL/XBYtDX 51Ge7V3EcRiYZH0mlJdhXw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1790634523; x= 1790720923; bh=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EgokS9EvnwdHMR7FHtMg X-ME-Proxy: Feedback-ID: i03f14258:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Sep 2026 18:28:40 -0400 (EDT) Date: Mon, 28 Sep 2026 16:28:38 -0600 From: Alex Williamson To: Jason Gunthorpe Cc: David Matlack , Fuad Tabba , Joey Gouly , kvm@vger.kernel.org, kvmarm@lists.linux.dev, Leon Romanovsky , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org, Marc Zyngier , Mark Bloch , netdev@vger.kernel.org, Oliver Upton , Paolo Bonzini , Saeed Mahameed , Sean Christopherson , Steffen Eiden , Shuah Khan , Suzuki K Poulose , Tariq Toukan , Zenghui Yu , patches@lists.linux.dev, alex@shazbot.org Subject: Re: [PATCH v7 00/10] mlx5 support for VFIO self test Message-ID: <20260928162838.44dc6abb@shazbot.org> In-Reply-To: <0-v7-c6d30e8ce1e4+3dfa6-mlx5st_jgg@nvidia.com> References: <0-v7-c6d30e8ce1e4+3dfa6-mlx5st_jgg@nvidia.com> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 21 Sep 2026 19:35:40 -0300 Jason Gunthorpe wrote: > Add an mlx5 driver to VFIO self test. This is largely a remix of the > existing VFIO mlx5 driver in rdma-core. It uses an RDMA loopback QP > to issue RDMA WRITE operations which effectively perform memory > copies using DMA. Since mlx5 has a stable programming ABI this > should work on devices from CX5 to current HW. The device FW must > support the QP loopback configuration. > > Also support send_msi by arming completion events of the RDMA WRITE > to trigger MSI delivery. > > mlx5 device startup is very complex and most of this code is just > booting the device, with a smaller amount for operating the QP. > > This entire series was coded by Claude Code in about 4 days. It > used about 4.5M output tokens, 30 individual sessions and 5600 lines > of AI-generated .md files. I spent an annoying amount of time > de-slopping and cleaning its work product to make it presentable. > However, previous VFIO drivers have taken on the order of 1-2 > months to write, so getting one in a week is pretty remarkable. > > For those interested, the flow I used was broadly a prompt sequence > sort of like: > > - Hey Claude, go look at the falcon series, VFIO self test, the > mlx5 driver, rdma-core and some PDF documentation and make a > plan to put mlx5 under the selftest. > - Write an rdma-core application using the built-in VFIO provider > that can do the required memcpy operations that vfio selftests > wants. > (This resulted in a 1k loc C file that compiled and ran the > first time but had a few bugs related to device programming > that the AI resolved.) > - Replace the rdma-core components with open-coded versions to > create a fully stand-alone program that does the DMA memcpy. > - Review and audit the thing. > [Pause and de-slop it] > - Make it work on a PF too (this is surprisingly hard!). > [Move to a kernel tree and copy all the .md files and .c program > it made] > - Hey Claude, look at all this stuff and make a broad plan to > actually build a VFIO self test. > - Here is my 1 sentence advice on what each patch should look > like, make a detailed plan to make a patch for every one. > [Pause and polish the patch plans] > - Execute plan X then commit it [pause and de-slop each patch, > repeat]. > [Review and final polish] > eeb2cc76b0b4 > v7: > - Fix some compilation problems, kvm and the igb Applied to vfio next branch for v7.4. Topic branch published as mlx5-vfio-selftest-v7[1] for conflict management. Thanks, Alex [1]https://github.com/awilliam/linux-vfio.git mlx5-vfio-selftest-v7