Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1027537ybb; Wed, 8 Apr 2020 14:59:39 -0700 (PDT) X-Google-Smtp-Source: APiQypKuiQX+YaPySAeOL6/YjTBuzPl9CI/NWW99Ifng+bgL4fqlIfhNFwjVuiot/wwzTP7XLR5i X-Received: by 2002:aca:4a55:: with SMTP id x82mr4289363oia.28.1586383179345; Wed, 08 Apr 2020 14:59:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586383179; cv=none; d=google.com; s=arc-20160816; b=utCP5A5tY3REtao28N5K4Oi0v9824/uOQpxE4YApqaEmUD62MzSOiK7CXMddN0vOJH WuWrkcw5lgc9WkUKfCYJf4XIMmd6kmBHk1RX4hTqwQ+9f/1jik5D2bvEjgGi20Iu1Qpa SLJ8RHRxHGA679ld752Eg9l3N/OV+jL87+mCjd6KekPjrIwbWfrM7wBXV6iezCLKlw8G IUtEWEMeS4G4PMYKgsYQS4g0Oh8osVrM0+07cKZT0AplXGD9DLk2YnctfPq4kXMgC7u0 eOidD1l3G9DG7YNoEgjAN+84q8qyxX4o+kXS8eGpv358UUEV0/j4ikBfxtZw7ng2r8Jg SKSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=tzxcVfYqDaPeZReasS8qD6qKEgdprHW9+s9O1hZTsQc=; b=uXbspqXfe2baB/8Lf1GmvJ73QZrgqesvtaR2cM+/5DM3KSunoGfcjTrkUMOVZyN2FS UToRkrEk31xb79H0hXunEg+es9iqmZv+8YwrtCKem9IEUK2PP2Cy1Mw20YxaBoZjJYmg MLdn7m1mtOgo26aroJ7Ger2W92Ir4ArKn5yESQWzYz+SpPH4N75D/cl/uikEABdH2KfS w3CZ1ghMrm8nSVYpfgWS++ORZEeXc421tNvZH5ar5I9R4UfpiDDjLIPYN6Phx75hMTLI 5iMrJsPCNSjf3Yo2O7+oLLrR0Q93fhX21qZTWaPI53zpJ7wyea5WXH68BitsVnUyXiaW XBwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=S7dku9eU; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si2383658oib.201.2020.04.08.14.59.27; Wed, 08 Apr 2020 14:59:39 -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=pass header.i=@google.com header.s=20161025 header.b=S7dku9eU; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730405AbgDHVVT (ORCPT + 99 others); Wed, 8 Apr 2020 17:21:19 -0400 Received: from mail-pj1-f65.google.com ([209.85.216.65]:53463 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729540AbgDHVVN (ORCPT ); Wed, 8 Apr 2020 17:21:13 -0400 Received: by mail-pj1-f65.google.com with SMTP id l36so365575pjb.3 for ; Wed, 08 Apr 2020 14:21:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=tzxcVfYqDaPeZReasS8qD6qKEgdprHW9+s9O1hZTsQc=; b=S7dku9eUTelk+NIxd5md2NkDK5b3imi2QHWeyDBBDDcrvmjt27DpHCsqUREtsSeeU4 LWtIXun2WRrvnU5+Mi+QDZ44E/PUo8yGraQxVZo+cw/gxAdVMVwxRGnzOrMTqqJjwG0q VmVYnfi+iIbuIo40rVQ2ZNnDI8pS3GVoxmWJEPMYkLvQe6jkBzm8XBD+lcpu1LxJU96P LKKbcKRTVIKRLRoN3CUUqXj0kj7QZFow/wHeGm4TMuTQLz5xwerblJaOAdMaSwPayqSW pwitgq51n5deonLMg1acLi5p4zxUKVEFyHZqIrb6PosYqToOkl/NrAAnKhXQUgMrTa27 CfbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=tzxcVfYqDaPeZReasS8qD6qKEgdprHW9+s9O1hZTsQc=; b=paRYwcFatJJgZALh2sLs0FG3l7cFc42CWG2IdKQdekTMSvb7jGMNHNarxz9usucrto sIBrR6hRRr1B3GUhG9WBbCOVZDU8qk1qTX10Rydmnhsn2iHeebSeaZK14ul4bbCRRwCN xQd1qiZa3Yp5jpaMF9Qnn8Q1ucfDDAyAn1cxH+aYjvlZ52MFVTjvT64xQ4GqfxI0B9Ob 21mMXXHDwEgvRwbawtu+JUE8te4eSYpD7dS0KyVyubyKf4C3Gub+pxikpN9NOGDj1jYp hgknHlfloI/6QQxpR18lyu6uJubpJE1CWFp2mu8qlkSLgDyigFG/yBrr2Pp1JDc2gDJC Xydg== X-Gm-Message-State: AGi0Puba1bCfPOUGt4O3XizaYELH9Xbg/Ibq9HaQtkx2gAXRV0OxPXxM gZBHHYNQ38UxTH1pUpW4QS7FAA== X-Received: by 2002:a17:90a:a4c9:: with SMTP id l9mr1907410pjw.44.1586380871617; Wed, 08 Apr 2020 14:21:11 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id d23sm17523800pfq.210.2020.04.08.14.21.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 14:21:11 -0700 (PDT) Date: Wed, 8 Apr 2020 14:21:10 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Christoph Hellwig , Tom Lendacky cc: "Singh, Brijesh" , "Grimm, Jon" , Joerg Roedel , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" Subject: [rfc v2 5/6] x86/mm: unencrypted non-blocking DMA allocations use coherent pools In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_AMD_MEM_ENCRYPT is enabled and a device requires unencrypted DMA, all non-blocking allocations must originate from the atomic DMA coherent pools. Select CONFIG_DMA_COHERENT_POOL for CONFIG_AMD_MEM_ENCRYPT. Signed-off-by: David Rientjes --- arch/x86/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 8d078642b4be..b7c9e78a5374 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1520,6 +1520,7 @@ config X86_CPA_STATISTICS config AMD_MEM_ENCRYPT bool "AMD Secure Memory Encryption (SME) support" depends on X86_64 && CPU_SUP_AMD + select DMA_COHERENT_POOL select DYNAMIC_PHYSICAL_MASK select ARCH_USE_MEMREMAP_PROT select ARCH_HAS_FORCE_DMA_UNENCRYPTED