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.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 0CEB0C2D0A3 for ; Wed, 4 Nov 2020 16:21:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 50175206A5 for ; Wed, 4 Nov 2020 16:21:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ccwuKEZC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 50175206A5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 63D426B0036; Wed, 4 Nov 2020 11:21:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 59E5D6B0068; Wed, 4 Nov 2020 11:21:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 43DB06B0070; Wed, 4 Nov 2020 11:21:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id 0BBBF6B0036 for ; Wed, 4 Nov 2020 11:21:45 -0500 (EST) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 913268249980 for ; Wed, 4 Nov 2020 16:21:45 +0000 (UTC) X-FDA: 77447251770.17.crate58_45057e3272c2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 71B94180D0184 for ; Wed, 4 Nov 2020 16:21:45 +0000 (UTC) X-HE-Tag: crate58_45057e3272c2 X-Filterd-Recvd-Size: 3712 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Wed, 4 Nov 2020 16:21:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=NKY4RDSn0UBs859d6dPsXhdr5/nXdulWdtU5Y3NVcbE=; b=ccwuKEZCoNEkv5u0gTSIw+pJX8 GT6KMUMxyruFGsU7wlJvS/WPodwWNZqxvg+84Sboy0HwzpX9tkhxGvs0ukVEtonnVLGNX4L+TsETw 7wuJuhvHfNsH9gQBWUEUvbbQ3Bw6e1qlG+jFDR2zV7Za/E0HImdeRZfq6Fe4uoWI5lrvLJjJ/Jvzr OgDGamj+LKQhBKh7CRWXw5xX/dvW98Gp+/kCmP0kdExERxfGBUdU6nkdmgK9PO8HpE4QF/uYJ6vJ3 ENmjBaeTVq7dnmKi4EfK3YgMruDfg6F4931eIXPJFu0VNYNegZZLGLRKqVb/QVl7tSb/r4511e6Kb DtZTsKjA==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaLXJ-0003Vy-2U; Wed, 04 Nov 2020 16:21:25 +0000 Date: Wed, 4 Nov 2020 16:21:25 +0000 From: Christoph Hellwig To: Daniel Vetter Cc: Jason Gunthorpe , J??r??me Glisse , linux-samsung-soc , Jan Kara , Pawel Osciak , KVM list , John Hubbard , Mauro Carvalho Chehab , LKML , DRI Development , Tomasz Figa , Linux MM , Kyungmin Park , Daniel Vetter , Andrew Morton , Marek Szyprowski , Dan Williams , Linux ARM , "open list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: [PATCH v5 05/15] mm/frame-vector: Use FOLL_LONGTERM Message-ID: <20201104162125.GA13007@infradead.org> References: <20201030100815.2269-1-daniel.vetter@ffwll.ch> <20201030100815.2269-6-daniel.vetter@ffwll.ch> <446b2d5b-a1a1-a408-f884-f17a04b72c18@nvidia.com> <1f7cf690-35e2-c56f-6d3f-94400633edd2@nvidia.com> <7f29a42a-c408-525d-90b7-ef3c12b5826c@nvidia.com> <20201104140023.GQ36674@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Nov 04, 2020 at 04:54:19PM +0100, Daniel Vetter wrote: > I don't really have a box here, but dma_mmap_attrs() and friends to > mmap dma_alloc_coherent memory is set up as VM_IO | VM_PFNMAP (it's > actually enforced since underneath it uses remap_pfn_range), and > usually (except if it's pre-cma carveout) that's just normal struct > page backed memory. Sometimes from a cma region (so will be caught by > the cma page check), but if you have an iommu to make it > device-contiguous, that's not needed. dma_mmap_* memory may or may not be page backed, but it absolutely must not be resolved by get_user_pages and friends as it is special. So yes, not being able to get a struct page back from such an mmap is a feature.