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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F36F2C43460 for ; Tue, 18 May 2021 08:49:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8CC761166 for ; Tue, 18 May 2021 08:49:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346606AbhERIu6 (ORCPT ); Tue, 18 May 2021 04:50:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241701AbhERIu6 (ORCPT ); Tue, 18 May 2021 04:50:58 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0C80C061573 for ; Tue, 18 May 2021 01:49:40 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id 76BDB2FA; Tue, 18 May 2021 10:49:38 +0200 (CEST) Date: Tue, 18 May 2021 10:49:37 +0200 From: Joerg Roedel To: Shameer Kolothum Cc: linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, linuxarm@huawei.com, lorenzo.pieralisi@arm.com, robin.murphy@arm.com, wanghuiqiang@huawei.com, guohanjun@huawei.com, steven.price@arm.com, Sami.Mujawar@arm.com, jon@solid-run.com, eric.auger@redhat.com, yangyicong@huawei.com Subject: Re: [PATCH v4 2/8] iommu/dma: Introduce generic helper to retrieve RMR info Message-ID: References: <20210513134550.2117-1-shameerali.kolothum.thodi@huawei.com> <20210513134550.2117-3-shameerali.kolothum.thodi@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210513134550.2117-3-shameerali.kolothum.thodi@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Thu, May 13, 2021 at 02:45:44PM +0100, Shameer Kolothum wrote: > +/** > + * struct iommu_rmr - Reserved Memory Region details per IOMMU > + * @list: Linked list pointers to hold RMR region info > + * @base_address: base address of Reserved Memory Region > + * @length: length of memory region > + * @sid: associated stream id > + * @flags: flags that apply to the RMR node > + */ > +struct iommu_rmr { > + struct list_head list; > + phys_addr_t base_address; > + u64 length; > + u32 sid; > + u32 flags; > +}; > + > +/* RMR Remap permitted */ > +#define IOMMU_RMR_REMAP_PERMITTED (1 << 0) > + This struct has lots of overlap with 'struct iommu_resv_region'. Any reason the existing struct can't be used here? Regards, Joerg 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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_RED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2610C433ED for ; Tue, 18 May 2021 08:49:50 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8D19E6124C for ; Tue, 18 May 2021 08:49:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D19E6124C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 4993E401F1; Tue, 18 May 2021 08:49:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id heqlkg-LAooq; Tue, 18 May 2021 08:49:48 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTP id 21C77400D1; Tue, 18 May 2021 08:49:48 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EBF4FC000E; Tue, 18 May 2021 08:49:47 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 87C6EC0001 for ; Tue, 18 May 2021 08:49:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 61C5382FA5 for ; Tue, 18 May 2021 08:49:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b5TMZLsQ_TFy for ; Tue, 18 May 2021 08:49:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by smtp1.osuosl.org (Postfix) with ESMTPS id 8567D82E3B for ; Tue, 18 May 2021 08:49:41 +0000 (UTC) Received: by theia.8bytes.org (Postfix, from userid 1000) id 76BDB2FA; Tue, 18 May 2021 10:49:38 +0200 (CEST) Date: Tue, 18 May 2021 10:49:37 +0200 From: Joerg Roedel To: Shameer Kolothum Subject: Re: [PATCH v4 2/8] iommu/dma: Introduce generic helper to retrieve RMR info Message-ID: References: <20210513134550.2117-1-shameerali.kolothum.thodi@huawei.com> <20210513134550.2117-3-shameerali.kolothum.thodi@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210513134550.2117-3-shameerali.kolothum.thodi@huawei.com> Cc: 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, robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Thu, May 13, 2021 at 02:45:44PM +0100, Shameer Kolothum wrote: > +/** > + * struct iommu_rmr - Reserved Memory Region details per IOMMU > + * @list: Linked list pointers to hold RMR region info > + * @base_address: base address of Reserved Memory Region > + * @length: length of memory region > + * @sid: associated stream id > + * @flags: flags that apply to the RMR node > + */ > +struct iommu_rmr { > + struct list_head list; > + phys_addr_t base_address; > + u64 length; > + u32 sid; > + u32 flags; > +}; > + > +/* RMR Remap permitted */ > +#define IOMMU_RMR_REMAP_PERMITTED (1 << 0) > + This struct has lots of overlap with 'struct iommu_resv_region'. Any reason the existing struct can't be used here? Regards, Joerg _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA11FC433ED for ; Tue, 18 May 2021 08:51:32 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E07360241 for ; Tue, 18 May 2021 08:51:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E07360241 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=T9AUVCQ7ajW7SoyjrLLe5rHe7B0UyFfJs4eT2VmAsYY=; b=XMuA5PANh5WLCwB5GVS/eA3oc PNz1GWP2RLKpzN4v49XBsuZ6/5EH6KjivufMJd9nIAXdYZ8wWXsQNsKnLQXg8PxBT7SjAxR/a7V4M qjE7BpTVbgBUeqIcc1Z80ks26kUjF1BIhu8FrLgwwEykn2nLTeuw3PzHmlhvJ/x12aLaihiV7E85v cQmsquRR6vzIFUqSPplmkBjIUcx+sZeLz1haYy/98F2Aki2OqfpnW9dI4YyYjxHbGd1sOsc9P3E85 xbCaGKEN3fFC4IcZldRz1ysxUlxhunekvyie1CEF0KULyuDp/bG3Zyllt5CurVuE9ZSv7EaLeYPzV EqTL3cGBA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1livQC-00Hb4P-UD; Tue, 18 May 2021 08:49:49 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1livQA-00Hb48-A7 for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 08:49:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JhW4mUPapd3AwIGgycpgdRGDZoYSAuKEvT/j68iJesc=; b=CZPz0HYDNVJmc+Ehvp485eJkJy Niz9PKvG7MsvNdBVciXxsS1yLaXTMf1f85kOsxCC9qOhJoGDBtcKU+HsJdfDESCLqeV27QUQji48n UYEeGDozPSWC74+5LsGAQKXl1EAXedNgNJCIcK7SllN65NREU2E8Wj89LmP3GDg04LO/+PZbGiRnY CwtXIsiYmSYdgxCWFEzmJqlqTILpg0zZVL/VquMs5rr2ZDgR0gB72pVoEPZ8WCXJplRP1gQyuSwMl ++DRWLTjeT7gbtweqy/snxr/W7qgf8L0BFZmihSLDPvGPa1Xi3+legVfqixMG42KHWygmPgRH8nJn LFmaZimw==; Received: from 8bytes.org ([81.169.241.247] helo=theia.8bytes.org) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1livQ4-00ETbg-Ci for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 08:49:45 +0000 Received: by theia.8bytes.org (Postfix, from userid 1000) id 76BDB2FA; Tue, 18 May 2021 10:49:38 +0200 (CEST) Date: Tue, 18 May 2021 10:49:37 +0200 From: Joerg Roedel To: Shameer Kolothum Cc: linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, linuxarm@huawei.com, lorenzo.pieralisi@arm.com, robin.murphy@arm.com, wanghuiqiang@huawei.com, guohanjun@huawei.com, steven.price@arm.com, Sami.Mujawar@arm.com, jon@solid-run.com, eric.auger@redhat.com, yangyicong@huawei.com Subject: Re: [PATCH v4 2/8] iommu/dma: Introduce generic helper to retrieve RMR info Message-ID: References: <20210513134550.2117-1-shameerali.kolothum.thodi@huawei.com> <20210513134550.2117-3-shameerali.kolothum.thodi@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210513134550.2117-3-shameerali.kolothum.thodi@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_014940_598994_ECB3424B X-CRM114-Status: GOOD ( 10.87 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 13, 2021 at 02:45:44PM +0100, Shameer Kolothum wrote: > +/** > + * struct iommu_rmr - Reserved Memory Region details per IOMMU > + * @list: Linked list pointers to hold RMR region info > + * @base_address: base address of Reserved Memory Region > + * @length: length of memory region > + * @sid: associated stream id > + * @flags: flags that apply to the RMR node > + */ > +struct iommu_rmr { > + struct list_head list; > + phys_addr_t base_address; > + u64 length; > + u32 sid; > + u32 flags; > +}; > + > +/* RMR Remap permitted */ > +#define IOMMU_RMR_REMAP_PERMITTED (1 << 0) > + This struct has lots of overlap with 'struct iommu_resv_region'. Any reason the existing struct can't be used here? Regards, Joerg _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel