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 49E2BD1D878 for ; Tue, 15 Oct 2024 15:21:20 +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=r3Rnuzqm/ZJHbwtJkwmQDmYpY5KahmUtxVsIkTFG29g=; b=ledSJ+oTiGItYWRAdYGc5Evfv8 P+FwKckhyig433fa1Wnpd6eEEchoabOTo2lNlcbszmnSC8Y0OobG0kz97e98AqgTETGYrdTiXJXxo QdV+r04YWBr99+VZX6vbYkTV1URUShFYw86+qNR7U6bInY477Rf3LTbtR1F5IwFQKbs/bNWyvW3gp sFfhRIREjkqZJNKHndEqIk9CTtR+flyP8gyeEW7p+iqEtuP7cpGjBEcTuIolGB0UhdBOnqxHMAlzA 0hP9EFJgGMFRsKjYoQHugZ3KSBK//PTq12Ip3I4a9yGAiGr1j/Tq1M6NBiS45NSetW1OLjp62Fnm+ L2Ip0BWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0jMA-00000008gDy-3zWV; Tue, 15 Oct 2024 15:21:06 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0jKg-00000008fv1-45yO for linux-arm-kernel@lists.infradead.org; Tue, 15 Oct 2024 15:19:38 +0000 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-20ca03687fdso537155ad.0 for ; Tue, 15 Oct 2024 08:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729005574; x=1729610374; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=r3Rnuzqm/ZJHbwtJkwmQDmYpY5KahmUtxVsIkTFG29g=; b=vo+TUxbYJ4EY+IdY3zWFuTYM/aEafrL7ZN8aOsC6F6BM/gdgiJ+wc3UFSO4xPfI/5w JZYUZHIJ1Ep5O/jgjvnXm3ksy0FW/9tO+DFK42qnQ+X+m1CdN4INwerc9ybK1/lFx6kp c42j81c1VDEkk7SeySR8NZNGD68JjE19N705K3lmrevyNnsa9AbjD1COYlWShytIc68u BoTNXBTG7g/5kGFBOp5msChoLPvJv+VVAjOjuCjbTvCKZFFnbR+jf96/01o8Bc+uTJI1 AvP/N2TVGBFf8yZIS9b1RyvQgVCyp1yQYANGVpBBBl9vly7zw6dITL2BGdGWEt3cqgS8 2BJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729005574; x=1729610374; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=r3Rnuzqm/ZJHbwtJkwmQDmYpY5KahmUtxVsIkTFG29g=; b=waF72VAwYsxatUa7OI3hKZTYTbLNDBhONKWeq4a1zphnudr6TBx4TPe1Hp4tT7mzk8 lvTxdmxxnPpFPyDRdlafSwL4PBSXwIvwMMYvNQsaLNJhnmyeEJRMOsXXMIr/RYISANWz raFsOmfiFyzIU8eYcHgIP2vo4X4mabKTJgBPEfIrB76cQZKNom7QVCdPuXoum9sF3YYj AcxnweEZhyio4u63GHmEBgw7sc8JhNErGSUWjMRYci6WLzLwqd6exz92k5Zn1lcHr442 qpdieGku9WgHiYJ/TyMpAcELTbPAC7vkeZiPOMkcWY+cRJ+6bxHjXG2UPQNhOt9Qn+DQ XKlQ== X-Forwarded-Encrypted: i=1; AJvYcCU2UEN76novnHYUoamMWGsq8qLqIDq1LB1j2oxo8mallEUqFmP3H2PD383BoE7CbZnbapPbUR26XNXaNetlBtye@lists.infradead.org X-Gm-Message-State: AOJu0YxYuypxYOZ31s/6AuMmoLFXIe+sldL4ELzzxgk9TClxTV0afNlY 1Uv3RDANdVjjp2DzmJQlwaCZzkWSvkqjRFC+CQ1lwY32aEthYBmfEaio0oMZEQ== X-Google-Smtp-Source: AGHT+IE0f2VvQeg757IQK69py4gyL7jf6g+kTHLVZTHwi8LjtCbcD40rA6RPqNG0wlsLEIalLzekKg== X-Received: by 2002:a17:903:2292:b0:20c:568f:37c7 with SMTP id d9443c01a7336-20cc02a791cmr6712555ad.17.1729005573959; Tue, 15 Oct 2024 08:19:33 -0700 (PDT) Received: from google.com (62.166.143.34.bc.googleusercontent.com. [34.143.166.62]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e392f037aasm1919291a91.29.2024.10.15.08.19.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2024 08:19:33 -0700 (PDT) Date: Tue, 15 Oct 2024 15:19:25 +0000 From: Pranjal Shrivastava To: Robin Murphy Cc: Jason Gunthorpe , "Peng Fan (OSS)" , Will Deacon , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joy Zou , linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Peng Fan Subject: Re: [PATCH RFC 2/2] iommu/arm-smmu-v3: Bypass SID0 for NXP i.MX95 Message-ID: References: <20241015-smmuv3-v1-0-e4b9ed1b5501@nxp.com> <20241015-smmuv3-v1-2-e4b9ed1b5501@nxp.com> <20241015124723.GI1825128@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241015_081937_564913_C8E2387A X-CRM114-Status: GOOD ( 19.83 ) 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, Oct 15, 2024 at 04:13:13PM +0100, Robin Murphy wrote: > On 2024-10-15 1:47 pm, Jason Gunthorpe wrote: > > On Tue, Oct 15, 2024 at 08:13:28AM +0000, Pranjal Shrivastava wrote: > > > > > Umm.. this was specific for rmr not a generic thing. I'd suggest to > > > avoid meddling with the STEs directly for acheiving bypass. Playing > > > with the iommu domain type could be neater. Perhaps, modify the > > > ops->def_domain_type to return an appropriate domain? > > > > Yeah, that is the expected way, to force the def_domain_type to > > IDENTITY and refuse to attach a PAGING/BLOCKED domain. > > There is no domain, this is bypassing an arbitrary StreamID not associated > with any device. Which incidentally is something an IORT RMR can quite > happily achieve already (I think the DT reserved-memory binding does need a > proper device node to relate to, though). +1. I assumed that the use-case was to first attach the streamID to a device and then intall a bypass for that specific streamID. If that's not the case, I'm not sure why are we trying to achieve that. I thought about rmr too, but it looks like the "device" is a DMA and may want to write to more than a fixed region of memory. > > Thanks, > Robin. Thanks, Pranjal