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.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 7B426C47E48 for ; Wed, 14 Jul 2021 23:36:53 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 47BAC613C8 for ; Wed, 14 Jul 2021 23:36:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47BAC613C8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Fjh/pozxN2FLuwlBz7PELEOvkQGREseGyE1/aJKkYuQ=; b=cPWImSD1RWTX4U 76rKSVne33A9T1+fmSAbWSJ3rkiUCFoRJxWAJi3KsQzaLzGRH7BrHzD4hjNOJpOOE6N7NcjoI+3Sy 4XK7KbfXHuAh14Fs32XxcjqJXc1OjeZylTfyE1dYNPQNq9msK8WYmt+pRKV75xmd9wYvv8yyVDDcB vApGWkyWehbWNaWEhXOXBWywVDIqis2Hr1kG2PYezftpDaQ3WmP6IlcqVzlc95VT8koJ5UCL6O2NU +q5kfQtDAYqNYpqtyUoIt7kEaU3wFe+/fppXKCbbrnkd/ZmNUXSYrTK9j3+ZEfAeM23xpO2u+Kq4X 8ezupUxCGFDl4DxTYqyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3oOX-00GKTZ-0e; Wed, 14 Jul 2021 23:34:28 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m3lrD-00FAZM-MV for linux-arm-kernel@lists.infradead.org; Wed, 14 Jul 2021 20:51:53 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5CF9C613DB for ; Wed, 14 Jul 2021 20:51:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626295911; bh=xAyIdXe/5fhq34AXTyvgdjHjmK5ndfv86zQ48bk0AJE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=WLPrmbY+/4G0TvI9fg6g5W/gH96ZMYa8lj/uZ1BhLE7SH6PB/P5a9HYbijdqUuTaL sKsL7R7hmGI11aE99N7FLPfwE3VMeU1/b1xpb5GNPUMfW8ydK8bson3RLBs3XgvcSW j+QxsuNrxkwlwLiPecBRrXHTMYmQDrJuxcdq4u3+yBdIOcUfsSR++EYhTBXZTzH9Fw cgAYzwKQ1QEUqUsmDwWaiYAdNscr3871knlhHMs5zteG+7IXqtoyalqWc9OBCnjGK2 eDSOoI4b/akid9ZOzp/NBUWMJMmuDVllwd3O7bRU2DVDv22glZx6Dda2Foy75q6uvd bmHQoij/psogw== Received: by mail-wm1-f50.google.com with SMTP id j34so2384766wms.5 for ; Wed, 14 Jul 2021 13:51:51 -0700 (PDT) X-Gm-Message-State: AOAM530OGER4dSFAYWveLpGGCSSZ7NunpOhON1tkibp+zS5cc5CXnVFI n6F9OdRCh1YhS+npxWJSR9/PzKdl86iNzJy0yu0= X-Google-Smtp-Source: ABdhPJz63KW2Ft3EbkVjZmLO4vq5WYRyfYEAftI+sXxudBSXv9441/KxGl10WXB7ZvaYYnopUapzerEF9J1s+q7gcgU= X-Received: by 2002:a1c:4e0c:: with SMTP id g12mr6068054wmh.120.1626295909914; Wed, 14 Jul 2021 13:51:49 -0700 (PDT) MIME-Version: 1.0 References: <20210627143405.77298-1-sven@svenpeter.dev> <7261df01-34a9-4e53-37cd-ae1aa15b1fb4@arm.com> In-Reply-To: <7261df01-34a9-4e53-37cd-ae1aa15b1fb4@arm.com> From: Arnd Bergmann Date: Wed, 14 Jul 2021 22:51:34 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 0/3] Apple M1 DART IOMMU driver To: Robin Murphy Cc: Sven Peter , Will Deacon , Joerg Roedel , DTML , Hector Martin , Linux Kernel Mailing List , Marc Zyngier , Mohamed Mediouni , Stan Skowronek , Linux ARM , Mark Kettenis , "open list:IOMMU DRIVERS" , Alexander Graf , Alyssa Rosenzweig , Rob Herring , Rouven Czerwinski X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210714_135151_817010_935EBC05 X-CRM114-Status: GOOD ( 18.37 ) 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 Wed, Jul 14, 2021 at 8:21 PM Robin Murphy wrote: > > On 2021-06-27 15:34, Sven Peter wrote: > [...] > > In the long term, I'd like to extend the dma-iommu framework itself to > > support iommu pagesizes with a larger granule than the CPU pagesize if that is > > something you agree with. > > BTW this isn't something we can fully support in general. IOMMU API > users may expect this to work: > > iommu_map(domain, iova, page_to_phys(p1), PAGE_SIZE, prot); > iommu_map(domain, iova + PAGE_SIZE, page_to_phys(p2), PAGE_SIZE, prot); > > Although they do in principle have visibility of pgsize_bitmap, I still > doubt anyone is really prepared for CPU-page-aligned mappings to fail. > Even at the DMA API level you could hide *some* of it (at the cost of > effectively only having 1/4 of the usable address space), but there are > still cases like where v4l2 has a hard requirement that a page-aligned > scatterlist can be mapped into a contiguous region of DMA addresses. I think that was the same conclusion we had earlier: the dma-mapping interfaces should be possible for large iotlb pages, but any driver directly using the IOMMU API, such as VFIO, would not work. The question is how we can best allow one but not the other. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel