Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp624466ybe; Wed, 4 Sep 2019 05:24:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLjoWq4EbHtUznl4WIq0neubCqldWKtK7wiwAlnSPKQoGwhnkfRoCo253fBNigyQ+KsjQ2 X-Received: by 2002:aa7:9086:: with SMTP id i6mr46598258pfa.216.1567599880750; Wed, 04 Sep 2019 05:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567599880; cv=none; d=google.com; s=arc-20160816; b=MTb6BPNmAPmUgyM6iVLYGA4Gv3CYia6DnDyAOI9CZgjKt+1s0yM9JsGURnYIbjNGki krfMf+1oLZW8v6PA96P9Cjt+9Cp6S8HNjaV6mPCDB/rNelROXhKaUYKiQVS8zz2nV2YW QElLybheR77QeCfJjhcNE1cCuVBpOL5cVS51IGn9CIneH270X54Dhs/ASsja7tlez8U/ Ap0e9pKpTWUCppjKvAJuGTp2AvefKxhphZxMu/CxK2uMtiGobUJbmrM3eGxVmNlgcJmo //SBQKUlqqpVL6dU8d9qR5mwqBqjKcPF3wKSoyrh5cUmTHtYecF1odI58woHxJptXtts OF7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=p4xwnk3QcMZRDVTI+Ilfg/a5Gh1VJ5mfJ+ENgw6ZREk=; b=vnAaSzcJul2K5qKNWmoMOYjGTGwPb4FcdqMdiWS/kndNyMg2qbm/F2wM/wTeePZfLL tTBQ/jK4lrv8Azde3DARlJl3PXhP4TWW70b/+vNZVJp7Ehki3kLnSBNtGYLgVbtjadn/ o3NuSxISbMv1FZ1F4br6SgIW1gctlFym6ObTN3O0gspSY7A2dpLJzs+RlMsJBmfQuO6q ZFNOiotfJUidPNwOSnXxpae1ZdYcCqIG4ubM695CdVrDi/uhFng+ataqTenHxVDyheOx 9gAy41ozdMrqpuTClKbdWxqasTRNMGd7jGRhBCVb3BvNYY0RWJuTptp2lzcUJG3epn71 Ajbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cEOtN5aI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o7si17062275pgi.127.2019.09.04.05.24.24; Wed, 04 Sep 2019 05:24:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cEOtN5aI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729609AbfIDMWH (ORCPT + 99 others); Wed, 4 Sep 2019 08:22:07 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:42586 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbfIDMWH (ORCPT ); Wed, 4 Sep 2019 08:22:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; 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:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=p4xwnk3QcMZRDVTI+Ilfg/a5Gh1VJ5mfJ+ENgw6ZREk=; b=cEOtN5aIUSshGFlNm1cUCBAk3y EV8E8pW467LFTlqVeymYmD3s6MOrFZoy3EFlNQelrEXJoxRNtk/vLw4o17cx5sbVGQzdgcmPHBFSv kjbSCmSdmhSDya9tTK6DwbBd4xveQgg9KDvtvfJxS2Kc1EDppJbkinubrRAgq6F9N2kGuOJiqc/Re k4HGhQzkuSrSbMSa+3mTxte66rvMomdVdVFYTWjuYTbWLZYZUblbpE9jJahXb77MzJvrGiuGcnb5f UIIegTTmtdXOHPooEI1kLmqSR7zp55J3fS4K2g2FN3vBOAjIlklWu0OEdPI1ZdwHFJz2+JBfDEwg+ W8Fpch9A==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1i5UIW-00060Y-GS; Wed, 04 Sep 2019 12:22:04 +0000 Date: Wed, 4 Sep 2019 05:22:04 -0700 From: Christoph Hellwig To: Thomas =?iso-8859-1?Q?Hellstr=F6m_=28VMware=29?= Cc: Christoph Hellwig , dri-devel@lists.freedesktop.org, pv-drivers@vmware.com, linux-graphics-maintainer@vmware.com, linux-kernel@vger.kernel.org, Thomas Hellstrom , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Heiko Carstens , Christian Borntraeger , Tom Lendacky , Christian =?iso-8859-1?Q?K=F6nig?= Subject: Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted Message-ID: <20190904122204.GA16937@infradead.org> References: <20190903131504.18935-1-thomas_os@shipmail.org> <20190903131504.18935-2-thomas_os@shipmail.org> <20190903134627.GA2951@infradead.org> <20190903162204.GB23281@infradead.org> <558f1224-d157-5848-1752-1430a5b3947e@shipmail.org> <20190904065823.GA31794@infradead.org> <8698dc21-8679-b4a7-3179-71589fa33ab7@shipmail.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8698dc21-8679-b4a7-3179-71589fa33ab7@shipmail.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 04, 2019 at 09:32:30AM +0200, Thomas Hellstr?m (VMware) wrote: > That sounds great. Is there anything I can do to help out? I thought this > was more or less a dead end since the current dma_mmap_ API requires the > mmap_sem to be held in write mode (modifying the vma->vm_flags) whereas > fault() only offers read mode. But that would definitely work. We'll just need to split into a setup and faul phase. I have some sketches from a while ago, let me dust them off so that you can try them. > "If it's the latter, then I would like to reiterate that it would be better > that we work to come up with a long term plan to add what's missing to the > DMA api to help graphics drivers use coherent memory?" I don't think we need a long term plan. We've been adding features on an as-needed basis. And now that we have siginificanty less implementations of the API this actually becomes much easier as well.