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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 223DAC433EF for ; Thu, 7 Apr 2022 13:59:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343795AbiDGOBn (ORCPT ); Thu, 7 Apr 2022 10:01:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343798AbiDGOBk (ORCPT ); Thu, 7 Apr 2022 10:01:40 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64A911BA699 for ; Thu, 7 Apr 2022 06:59:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=Wz4hNkxsawX4PgHGVpqI7DcWA7D+ygHUR+Jezxq/sok=; b=p8lu6HeON3HuIqNpvtMeUF8UAq 8f/e/8K+TvocGaKgfxOWSnIxVRfDL+25cIGEQltU/vpsnWLs2u/cG7YeDVQXUgeJTiZe8j2EoesMO Loeu+j1y4VJZO8fvV1AahrwbE4sG/A7yD4tJRVr6AmEOKACG84SlM1jp/JtepWhAi6LmBp+BOUfit ZzxkGfAGEayAyrxcI5txuKnCg1fXhQZD6P7u8aBmmg/d1yEN9g1AP9lVPYA9bu9GpcDVKq2+Jd3E5 hODo+PqENwnnZJ56le4zI75STD1YwMVBU/WUTN5Qub3jEdLXTyVUXKJ7TBMWmS0f4KEG1o3wCfRSO NfTZduow==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncSfc-00CGaB-Oy; Thu, 07 Apr 2022 13:59:32 +0000 Date: Thu, 7 Apr 2022 06:59:32 -0700 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , Shameer Kolothum , jon@solid-run.com, linuxarm@huawei.com, steven.price@arm.com, linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, wanghuiqiang@huawei.com, guohanjun@huawei.com, yangyicong@huawei.com, Sami.Mujawar@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v9 06/11] ACPI/IORT: Add support to retrieve IORT RMR reserved regions Message-ID: References: <20220404124209.1086-1-shameerali.kolothum.thodi@huawei.com> <20220404124209.1086-7-shameerali.kolothum.thodi@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Thu, Apr 07, 2022 at 02:53:38PM +0100, Robin Murphy wrote: > > Why can't this just go into generic_iommu_put_resv_regions? The idea > > that the iommu low-level drivers need to call into dma-iommu which is > > a consumer of the IOMMU API is odd. Especially if that just calls out > > to ACPI code and generic IOMMU code only anyway. > > Because assuming ACPI means IORT is not generic. Part of the aim in adding > the union to iommu_resv_region is that stuff like AMD's unity_map_entry and > Intel's dmar_rmrr_unit can be folded into it as well, and their reserved > region handling correspondingly simplified too. > > The iommu_dma_{get,put}_resv_region() helpers are kind of intended to be > specific to the fwnode mechanism which deals with IORT and devicetree (once > the reserved region bindings are fully worked out). But IORT is not driverâ‚‹specific code. So we'll need a USE_IORT flag somewhere in core IOMMU code instead of trying to stuff this into driver operations. and dma-iommu mostly certainly implies IORT even less than ACPI.