Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp973469ybe; Wed, 4 Sep 2019 10:29:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzd6Sr/VwBNrz7yQ//oHSj2togngVHFvbUjwsnhLOuiML2lWeexC4TFVm1VAO/RC0D6hyG X-Received: by 2002:a17:90a:b292:: with SMTP id c18mr6157496pjr.1.1567618184648; Wed, 04 Sep 2019 10:29:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567618184; cv=none; d=google.com; s=arc-20160816; b=fPzoLY9WqadShg1KJiOp37g+CbXHBkllGKq1YvcizhyEEt0JdR51u/H7s8OOuzY3Cl tNiy6vh6pfFi9HNZoDjHtjk0wuCjWuMfrImDGISlF66XfL+WOWiSuroaxp72e4Z9fCle Tm5jFtX/eUrCI8Sf2fOSBuZKMfZ5pBd+Nj8f89N0UtrH1hUibtal6U+PTmx4xjZiCY6b AeyuI68SQfbk3mKpf1Up9Efvs+BzN95WFuPwRYztK0J/aWZL6auvcI7LiSbJG/4yWgVv zQs/Xf1o0B2YQ/McLxtrE2QwoA7mjjulN0YcVtHTDFYUfzqo2IxX/JT8An69MRd7LtgD dLPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature; bh=hyFsbRFQO+WvyL2Fd9Q0on1r11lumvLLpIYQjAbuZ8A=; b=Xpk9nzCwAnvE1md3uU0K4LE6Vdv46GpyAeMI5iH7LVJXHy1b3oRFZuMMVBxKMAtktz 8kiRzxBdmFaDT8p+vvE4AUr/r/IPovQnMXPTMYPTpNwfhzEUY4MDqSRksOR107idaovp U3Ba9AZAVBOaqf7KEmkuTF/e62PwO7+e3ItKhDjBcF77PqFsl4hbJHXt++mOdZEPXRcq f63J+gmWEtaZs+IUQ1yBpibKdgd4ZCk7lsjMDCn4JCNatS8CqSvzYtQbl5jYuxBlOdgA xviy3rrpSzTerlVjSsHkT9Rr7pBDKNX6Zhm6+ZUkmDL+K5MSTa8eJvXqWOpcAh7NCmcL vmEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@shipmail.org header.s=mail header.b=iERqBUul; 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 n5si17582771pgq.154.2019.09.04.10.29.28; Wed, 04 Sep 2019 10:29:44 -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 (test mode) header.i=@shipmail.org header.s=mail header.b=iERqBUul; 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 S1731648AbfIDR2h (ORCPT + 99 others); Wed, 4 Sep 2019 13:28:37 -0400 Received: from pio-pvt-msa2.bahnhof.se ([79.136.2.41]:41344 "EHLO pio-pvt-msa2.bahnhof.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729656AbfIDR2h (ORCPT ); Wed, 4 Sep 2019 13:28:37 -0400 Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa2.bahnhof.se (Postfix) with ESMTP id AFEFB40CFE; Wed, 4 Sep 2019 19:28:29 +0200 (CEST) Authentication-Results: pio-pvt-msa2.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b=iERqBUul; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at bahnhof.se X-Spam-Flag: NO X-Spam-Score: -2.099 X-Spam-Level: X-Spam-Status: No, score=-2.099 tagged_above=-999 required=6.31 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Received: from pio-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rBGq5zMsLeAq; Wed, 4 Sep 2019 19:28:28 +0200 (CEST) Received: from mail1.shipmail.org (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) (Authenticated sender: mb878879) by pio-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id 3031640CF9; Wed, 4 Sep 2019 19:28:16 +0200 (CEST) Received: from localhost.localdomain (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) by mail1.shipmail.org (Postfix) with ESMTPSA id 7ADB6360160; Wed, 4 Sep 2019 19:28:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1567618096; bh=g/YBsHGIYYFph7qo+7u1a+3fuQm1INNdutAJRrM12b0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=iERqBUulThtpa34mSoRstP7r957CqdVD6ctHb8Ma8Wk2aPgzDiav67Q0WmgAvmG5b wXyLpgdeIgGXnAakCc+wuacTDhEZm8LymtGPX3t0ofQHAdrGGhux8O+sQGbp3hjbe8 +f/GcL1KwCTpOmhi0+GC0ha3hNVowvOcwcVaXZsU= Subject: Re: [PATCH v2 1/4] x86/mm: Export force_dma_unencrypted To: Christoph Hellwig Cc: 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 , =?UTF-8?Q?Christian_K=c3=b6nig?= 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> <20190904122204.GA16937@infradead.org> From: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28VMware=29?= Organization: VMware Inc. Message-ID: <4cb5a2b4-cbd0-a86d-7881-f3d750df7d0e@shipmail.org> Date: Wed, 4 Sep 2019 19:28:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190904122204.GA16937@infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/4/19 2:22 PM, Christoph Hellwig wrote: > 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. I'd be happy to. Thanks, Thomas