From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=202.12.124.158 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796426165; b=Xj7oi8l9ZncFvWDZptEfI/3M5dHNb02YVClLi71zCoAQqO0DofPfdHXy0oDHi77iDr9M fe5KQ1U3jgAHp/z9eyUUp0IStdJru+HFtdpNnCJA5WNtVQF+H2+MRGB6RlgatR764JlWP qOaOvFN6enpMvynHUWxSH1piKqJbvIBhHK+ntI89Z02mrZZpJNYs8iKT6sFzJjrfIsRM/ lqKlKLUYJ6oTjZ4NvOQ4T9RC6YS6Qmm3tx/vTx9anQ/Vh2wU5igMSzGJvDO6Pdi1hhSed W2f9qtgw0c/0+cqMcaMNH3Uh2tmhMyrGQZ1JeOY8f0Y2JANFxejju+uFpy+DOzyg/3Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796426165; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: X-Mailer:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=9YX0GXT05oTQ4ot8uOnLFKGEEgnQDx/shv8PAQDkwsY=; b=jEstPZ5wUgQRnCbbfcs1MCTA2IIzbzI4DxxOfUfeUeb6Wz9kvKtxOhlTRqHVQQKWGKU7 +tBizZgIpJB2BVonOnIhzcRjT+q+PUw7TEhaKW/5JBl6bLuUFGIdTGr17KY5VOPzRi3jl Z3XJN5UXXcZE3Gspp77x5U5qc4AdNZ29nVlQ4VEJR4IqsZNY+1y3NozoavJIbt0sCzD41 PgU91Ln2/CLreiAfs5NQ/lMJqGxENi0HwZpLamOmkw+6KSLAl+xf73+cm7NCpEnpO9eWq tqOWGDVt0vA0NULJBViYnvUPW+Z2mwReMoyGNCvLzEYU0Y7tlPb3TI94RRtvUM5XfWw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=shazbot.org; spf=pass smtp.mailfrom=shazbot.org; dkim=pass header.d=shazbot.org header.i=@shazbot.org header.a=rsa-sha256 header.s=fm3 header.b=FRTRceda; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=vUTMSKKv; arc=none smtp.remote-ip=202.12.124.158 Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 456F6606A680 for ; Fri, 4 Dec 2026 23:16:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 456F6606A680 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, unprotected) header.d=shazbot.org header.i=@shazbot.org header.a=rsa-sha256 header.s=fm3 header.b=FRTRceda; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=vUTMSKKv Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id C92697A0134 for ; Fri, 4 Dec 2026 18:16:04 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Fri, 04 Dec 2026 18:16:04 -0500 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=1796426163; x=1796512563; bh=9YX0GXT05oTQ4ot8uOnLFKGEEgnQDx/shv8PAQDkwsY=; b= FRTRcedaAe/UY/0wMBCvr8Qpm1VdO572FrrXGw/b3zeksjOz6Qte8WUhQB77jKLV eji/DiSNR2xVZV8m5twS+eG8ZP9y1L1CGghsQ9eLuK6Bwkm42nL6vkP0MUZbnLea j4ZGVjt8Bqg5XAI9wcjKQGCIIV8YpCLPaoEomPrSQsnWl7M+XTrbumPXTJRTmT2h qNRAKyvLYy0HfEnOtO2iRKeqbCAuJp2nK2vZAs5Zj6sBs3Phi2hY17jrL9pU/h10 k15hAub6RW74YpA/cYyEmW/dTnL69r3U1uLkBHrJdEgaTf2MJfWgbYrIfGz1qbhI dDs766JT5YSZ56H7ZNupJA== 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=1796426163; x= 1796512563; bh=9YX0GXT05oTQ4ot8uOnLFKGEEgnQDx/shv8PAQDkwsY=; b=v UTMSKKvFXtOX252tffpErwFoXWKCqf7ig3zc1JGg9RLyaK460EYcrDbCoLOiksO8 C+aOPUC/w2Vc+ydBh1hPfbARiYSz1kO7jSmSFejRPKT6eYCwqb1Suc44pNSBkuLE 8j0qyHOzeZl22Gw7itRPgh7h7MRYqXwHh0ehMrbnYde8a4SqeWAz8WHVZLEMuER9 J+PO2rGqCU9xJfkPUdq42U0IWpDqPxLszCzuZmiEUT8R92q7zf07l+rrWLMJpzA3 eGL/2u4KThEUkJtNV4kinAJ3o7tE+XQAoWdL5G55NyKNtLTlV+o2MePpf7kgpxwq N/eY/JwboA0I7mCOdWVpA== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=shazbot.org a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1796426163; d=shazbot.org; mf=PGFsZXhAc2hhemJvdC5vcmc+; rt=PGxpbnV4LWtlcm5lbEB2Z2VyLmtlcm5lbC5vcmc+; s=fm3:rsa-sha256:PyZAnHygFhnElb4AB/YtcRr7nVPVZnrENWRyM12u0vMw0dB d8vcz86tqeNwqFSNvtG1ku/A4gHxd0CTe1cB38SDFzqhaMLqg6X6lRYvxvuoIV7V bV562hWqwya5qHfUOs5v7FvNQbRAsHKI2evHxDCwnGD2ZR4OMefgZOlsTUpKG5lM x6iMrJzeRCZ0USQBJtIyv/lVPixHNaoW9I958HL5CYs8jY/WaMNQaKPrb7yqdf0V +zPYn1M2xvqsEPTOaBrEpZiZ3mG5Y+kQ7mtO9W2PJELZ2U2R7F07ibugWlfzifoA 92b+EAekIAVXAD9vI7F9C1Ql70UwhLiNgXyXG7w==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-transfer-encoding,content-type,date,feedback-id, from,in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:Ra+hRtH/91A+NpOHa7L+UwHMjAojsMMzTNlWURKTJio=:0PPjo473LpMDpLrOMYQh7V8kdvRDo/cZnmEyd5jAq1g=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEJDXfIGJ6OhVVyz53jpbqQtvgTW+BJ4aw710+ycscS6QghsHk50dk7rZ3vdkXTQn BE3gIZvio3oyBLrv9IaxkXABtnZYb0DmoQVEp4mUzfSNwpDn+3Gk2Zr1+gNZWNV6IpHuHH qT9cbGXgJsKVvLRvCh+WFaipQweqRUwFeXaGB9FUuvtTQ97d6nQ/D42R2mXwhMMFX0KWO+ N+aw05spcpoBq52XbuNFqGSJkWD7l/jrvtcRGRwOUvFbBOHXVng0b6am5CmikoRO0r/Pi0 X/8mUmKP6Q60IDs2rZy6bBF5U4F8xh1qrgn4H/TSSAK1B6Zqxx2n8Oin/YxOb48inDgsZf sP6JTYat2RG81YhBUTnxLkTPwO3/lQDGhdcT1P0ngdBDc2zOvZ/X/6pBb/lSIw2GwyeY/T RuoR893uPHEpdjEewC1u3oFM35wr9YJvT2aoqJ4oBawVP5CeQ7oer4cfTwiPY68a86IjSk LXaQc/71oVgd26+c9cCmGKCqoyPzmT1wBk/ltafcZ8GWhzBoZCAdufq82ecTSGSRcGvfzr FSQ5hjG25b8i/caIcRj3zfd2S3t6k8ouv1ZBp7BmO/pvCNaHZKw7snuKKHsWCcOZP2+/8i KO7EZyvQ3G6hYE38tBJm1T4mvMnRRY9oGne3SnVYtEUiYUH9W7ktMWVyNArw X-ME-Proxy: Feedback-ID: i03f14258:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 4 Dec 2026 18:16:01 -0500 (EST) Date: Fri, 4 Dec 2026 16:16:00 -0700 From: Alex Williamson To: Ian Rogers Cc: Nipun Gupta , Nikhil Agarwal , Jason Gunthorpe , Kevin Tian , Yi Liu , Nathan Chancellor , kvm@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, alex@shazbot.org Subject: Re: [PATCH v2] vfio/cdx: Fix missing detach_ioas op Message-ID: <20261204161600.5fdad8fc@shazbot.org> In-Reply-To: <20261201172554.1402224-1-irogers@google.com> References: <20261201172554.1402224-1-irogers@google.com> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 1 Dec 2026 09:25:54 -0800 Ian Rogers wrote: > vfio_cdx_ops sets bind_iommufd, unbind_iommufd, and attach_ioas to the > vfio_iommufd_physical_* helpers, but omits detach_ioas. When > CONFIG_IOMMUFD is enabled, __vfio_register_dev() checks > !device->ops->detach_ioas and fails registration with WARN_ON() and > -EINVAL during vfio_cdx_probe() -> vfio_register_group_dev(). > > Commit 9048c7341c4d ("vfio-iommufd: Add detach_ioas support for physical > VFIO devices") added detach_ioas across the other physical VFIO drivers > while omitting vfio_cdx_ops. > > Add the missing vfio_iommufd_physical_detach_ioas callback, found with > Clang's require_explicit_initialization attribute. > > Fixes: 9048c7341c4d ("vfio-iommufd: Add detach_ioas support for physical VFIO devices") > Signed-off-by: Ian Rogers > --- > Changes in v2: > - Fix the Fixes tag to 9048c7341c4d ("vfio-iommufd: Add detach_ioas > support for physical VFIO devices") and update the failure description > to reflect __vfio_register_dev() failing probe with WARN_ON() and > -EINVAL under CONFIG_IOMMUFD=y (spotted by Sashiko). > - Link to v1: https://lore.kernel.org/r/20261130225358.97751-1-irogers@google.com > > Note: Found using Clang's require_explicit_initialization attribute; > an AI coding assistant helped audit call sites, verify Fixes commits, > and draft the changelog. > > drivers/vfio/cdx/main.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/vfio/cdx/main.c b/drivers/vfio/cdx/main.c > index 28dc8c825600..8aca3538293d 100644 > --- a/drivers/vfio/cdx/main.c > +++ b/drivers/vfio/cdx/main.c > @@ -308,6 +308,7 @@ static const struct vfio_device_ops vfio_cdx_ops = { > .bind_iommufd = vfio_iommufd_physical_bind, > .unbind_iommufd = vfio_iommufd_physical_unbind, > .attach_ioas = vfio_iommufd_physical_attach_ioas, > + .detach_ioas = vfio_iommufd_physical_detach_ioas, > }; > > static int vfio_cdx_probe(struct cdx_device *cdx_dev) > > base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244 Applied to vfio next branch for v7.5. Thanks, Alex