From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1B82CF54AC4 for ; Tue, 24 Mar 2026 14:35:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SjomO9wEEREnV8WuHEIroZdosOt8lSeQff3H3GpWa24=; b=Z4o+MAEdpzaUDjTDmKU1NBgfwV N7KgQ346HsRKXqHUG3A8yU2NMBAWKbe4Jojj+76fJ7BXXUXgk+QCHf6f+IEqvoZqJKIanm8x3ydaZ kqW0RVFNjY1QpVsuk+gM5kqtSy2uV3Qq+oq4P3KspyJZmatJ5O+pWALEyCuidB5TlQ2yfjz0Wp1qB jwpbJcGur7/CmSxWE+ZT38K1JZCkeZqOjjaumquqhGOpNSbQgqJ3JFNpm4Hrf7xUZr1X8etyvar4i 5SvDn8OIXUzFnWsG29/rVFviBW5TxlKk042e5p7GIlt3nVRBnSysNNQgAD0xH8MspX8CzPnA/Nrg+ XQFdI3Ag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w52qo-00000001evJ-3l5u; Tue, 24 Mar 2026 14:35:24 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w52qo-00000001ev7-1q6N for linux-arm-kernel@lists.infradead.org; Tue, 24 Mar 2026 14:35:22 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 41327600AC; Tue, 24 Mar 2026 14:35:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3E12C19424; Tue, 24 Mar 2026 14:35:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774362921; bh=uOYMsAQrT9pGVzbOF7/UPE/o+tRze2Aon9yTH5zjzQg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UZhNTp+dI+wMVMQKiqHwSW9F/Asfh6VT+WUVCxqwISW0QbEnFn8Sw3zKA7/kn11fE LjbgrC4G2Nkch2y3oryACm+ladvDINe6raJjBOuUg1gfBuyJGMMr3Y7/Ze/3AjFLfP TsF/ZSbNXP+8k4jl+aRV5qSj+vGpDCcAswyZRx5wOeoRH9Tw0unQs6Rf0jDIRyguZ2 8OYd0AaE+e3TYSUdbuklSA9AaCXyakV9+wgXFExYrlUiXKEiWd0SEA0eJFEl8ScFLs V0ZGZ0EEBB0ODX4AOeZU3E1VYaiUM6Sq7CoRRTwOcC5/cbXICkkO2fXqEUlJTOgnJk PaOBn1PeAbj7g== Date: Tue, 24 Mar 2026 14:35:14 +0000 From: Will Deacon To: Jason Gunthorpe Cc: Lu Baolu , Kevin Tian , Nicolin Chen , robin.murphy@arm.com, joro@8bytes.org, praan@google.com, mmarrid@nvidia.com, kees@kernel.org, Alexander.Grest@microsoft.com, smostafa@google.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, bbiber@nvidia.com, skaestle@nvidia.com Subject: Re: [PATCH rc] iommu/arm-smmu-v3: Drain in-flight fault handlers Message-ID: References: <20260307001723.964956-1-nicolinc@nvidia.com> <20260312142509.GA1586734@nvidia.com> <20260324141716.GB7340@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260324141716.GB7340@nvidia.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 24, 2026 at 11:17:16AM -0300, Jason Gunthorpe wrote: > On Tue, Mar 24, 2026 at 02:04:03PM +0000, Will Deacon wrote: > > Sorry, that was sloppy terminology on my part. I'm trying to reason about > > faults that are generated by accesses that were translated with the > > page-tables of the old domain being reported once we think we are using > > the new domain. > > It doesn't matter. > > If a concurrent fault is resolving on the old domain and it completes > after the STE is in the new domain the device will restart and if the > IOVA is still non-present it will refault. This is normal and fine. > > If it is resolving on the new domain and the new domain has a present > PTE so the PRI is spurious then the fault handler should NOP it and > restart the device. Hmm, I can see that working out if both domains expect faults, but if I'm switching to a domain without a handler wouldn't I be better off draining the outstanding faults generated on the old domain first? Otherwise, won't we see a bunch of noise from the eventq thread as it dumps unexpected events to the console? Will