Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4287234ybh; Tue, 6 Aug 2019 09:09:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyov9BvH6Y1wqD4SSxdFM0zXPTyQDJ1TCYgQxHbS+UHkXfXQ7YhArBnwFfpNTq8Ipo7Zry0 X-Received: by 2002:a62:2a4d:: with SMTP id q74mr4499121pfq.86.1565107793345; Tue, 06 Aug 2019 09:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565107793; cv=none; d=google.com; s=arc-20160816; b=eWDtzmV4eCfNF4e6QKWGwpM8nBK1WpySz5Rropj4uy71XNN/l0F3TslrBsPSVeDlYt TpElItdcZR2zroZqHe5F0IG+UtdYOwGXAzNzU4P6xpMBk3VA9IzkCfNcajoLpCAcO3CU SV9c8J4T0wHZN4IEinbLGnJHV1RLjjWDSyA+/hfJO6IxK7RZSvfM9Hj0rJZjsFgYF9dN g0L4Ie3Dl5xx++dOaq0wBGgP9rqdIykJ60lxas0s9iRHJIJKe7UljTQ5RmEPPEmx2YcR sUvCrPVR9w7v0NGt8BhkvWaCS11zGrDMMBcHCTlEf6Sbic9v5U5Rldd+AtIIKdwoKPU1 NqeQ== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=fjVymMt2J+tCrZmIIVFntxuh1qzRWnXKrvFUGnScOW8=; b=PJ2FZiwbp1j3lDtX6wf8LXX/IyfEB/5j7t9s2w4rK913zzQFFpM3kiMN8VL4grm/O3 j6M2qzDGVjJgoNeum5yyIjiDoOjtTXSXt06qqBcIEEHV0n4Lc2D8eb53iEpX5+YiI1R3 SZAvrxRrz1I0pyd02Uw2Ifimv4xsuL2LZ3QMZnEhRSP+ASna8gN44jUNW7+aLO767sLQ UpowRudo2eBrKfEViJawMYEyJTp+J3EapsEgBtQMLkzAH1MYe1EFV0QEFrBkxSn96CX/ EbnZ26Vlh2a1PT1pHw4v8ep1pIsPP2XwlbPZ3sTzt4cLX0ejojWpUk0W0c6Rk8ETmwhm DZuQ== ARC-Authentication-Results: i=1; mx.google.com; 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 t18si41853956plo.328.2019.08.06.09.09.37; Tue, 06 Aug 2019 09:09:53 -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; 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 S2387799AbfHFQHO (ORCPT + 99 others); Tue, 6 Aug 2019 12:07:14 -0400 Received: from verein.lst.de ([213.95.11.211]:57669 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732048AbfHFQHO (ORCPT ); Tue, 6 Aug 2019 12:07:14 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 1C619227A81; Tue, 6 Aug 2019 18:07:10 +0200 (CEST) Date: Tue, 6 Aug 2019 18:07:09 +0200 From: Christoph Hellwig To: "Lendacky, Thomas" Cc: Christoph Hellwig , Lucas Stach , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , Thiago Jung Bauermann , Halil Pasic Subject: Re: Regression due to d98849aff879 (dma-direct: handle DMA_ATTR_NO_KERNEL_MAPPING in common code) Message-ID: <20190806160709.GA25586@lst.de> References: <1565082809.2323.24.camel@pengutronix.de> <20190806113318.GA20215@lst.de> <41cc93b1-62b5-7fb6-060d-01982e68503b@amd.com> <20190806140408.GA22902@lst.de> <1565100418.2323.32.camel@pengutronix.de> <78833204-cd30-1a4b-54e3-1580018c6d57@amd.com> <20190806154602.GB25050@lst.de> <5bd42e33-8077-ea23-a9f3-c575db4edada@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5bd42e33-8077-ea23-a9f3-c575db4edada@amd.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 06, 2019 at 03:59:40PM +0000, Lendacky, Thomas wrote: > As long as two different cookie types (page pointer for encrypted DMA > and virtual address returned from page_address() for unencrypted DMA) > is ok. I'm just not familiar with how the cookie is used in any other > functions, if at all. DMA_ATTR_NO_KERNEL_MAPPING is intended for memory never used in the kernel, either because it is just a buffer for device that are too cheap to enough dram, or because it is a buffer for userspace to device communication that the kernel just mediates.