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 3FF21D1D875 for ; Tue, 15 Oct 2024 15:15:01 +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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=B5KxwWoPDihlkBbzlck5C9ytHcfGGohy5aIBZKaXn0k=; b=ao8qTRgtAgloR4i4RCqd76Vh5S Isburfb2fFA6iaSfh0I46nHmPdOzoYdOvdkueB4nL5zze8pJCKyCQ8ejRPqlyrdME/tr6NlQ0dtwG eyBAZGFTQPvS4BxMd8Wo3nDu8kKU/b5XYS3b5RKOIjniHmEw3hNJXD9+bHQtJ6e23xnMT+8VZg4Rm 7AJKhxXulyGqb1P/rW4Hq1urp1ANDprOQ7p9d+9XZGLMhEhKal9o4Jqa/1HBYOPgv5PskuWX+yoVO jxfXp03tOlB3SXOPWbr0vZMWvXJWl6+UicHcyy/XQF29dVxKnARpfQFdJ7bP6wTqYpqWEZHIbzoLY qb37aaqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0jG7-00000008fCj-2zCl; Tue, 15 Oct 2024 15:14:51 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0jEg-00000008ez0-3f7k for linux-arm-kernel@lists.infradead.org; Tue, 15 Oct 2024 15:13:24 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E4CEBFEC; Tue, 15 Oct 2024 08:13:46 -0700 (PDT) Received: from [10.57.87.12] (unknown [10.57.87.12]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4FFF33F528; Tue, 15 Oct 2024 08:13:15 -0700 (PDT) Message-ID: Date: Tue, 15 Oct 2024 16:13:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC 2/2] iommu/arm-smmu-v3: Bypass SID0 for NXP i.MX95 To: Jason Gunthorpe , Pranjal Shrivastava Cc: "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 References: <20241015-smmuv3-v1-0-e4b9ed1b5501@nxp.com> <20241015-smmuv3-v1-2-e4b9ed1b5501@nxp.com> <20241015124723.GI1825128@ziepe.ca> From: Robin Murphy Content-Language: en-GB In-Reply-To: <20241015124723.GI1825128@ziepe.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241015_081322_990716_FB1BEBA9 X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. 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 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). Thanks, Robin.