Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2972146pxj; Mon, 10 May 2021 15:20:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4xjfR3cf4IZhrX9NmXQSCRqf9no1MF//ZjCMhDXXDRZ67mFAz4dLhTFNrMkGXMy/XQazE X-Received: by 2002:a6b:8b06:: with SMTP id n6mr19397898iod.87.1620685217621; Mon, 10 May 2021 15:20:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620685217; cv=none; d=google.com; s=arc-20160816; b=eX53IPhL+8i1a3tC2+0r7IkJb81jKESMfJZ1CBtS73s/OPhkLMmQJUABC3BCdaUxk0 JoUwDNqsQ4YWRT1zAOlygnD5+7YJEUzayluqpCanjem+7YlS2GIe7XEBiIZZ+wQBhl3/ nefoxR1Z1Ks1dwfIt6jhMp77zf1m91SOTBUJJomS3Vued78v79XHRlUCDWzXxUr3kBuR Z/wBzXEkMa0Q3/ac3xVpcPgTI5jL0z8FqBnCYoduiGJnuUDQRWZG+stXGfUNMwoM1CzZ pHR9BO1lx0nkXLN0Yqvy9s+r/gIFDD5K3TzCyy44aLZMfaHa4GZRDgWezxoK9YBEWQOQ Z2lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=6D43mnMHRab4ssSDNIDxHhsvLwZDcfeeiBMWQQjA6zU=; b=SV4YqYRuNzdchC0USkqzVrWgEZSY2dOtwqQzhoLEuXhNpCEx/C1nAEKdSCkFUXTaMi efnSL3hRLwhJndqNBPbBK/h2KemvzgecnOVBjI7FViVRwKeIBceH3bGdEO2ewHnuDi4D GjGbWKt4X0xA4cMvBUS/u4QIyuLBBU90SzZ0Xf+ouuDijAmfzC1dRmti7jSyB5Fzg5y5 EXB2d2bTjvtJzEkdl/i90XHP6k6pGYeb6qWSMvi7QBnsgMVtTheVqthp1mukKCbjerZD 73rO5TuKb4cJYp24TlH2Bx/dgmlQeEyJ42kRgYd+JMmUbh1h5xYKNFYUkkj1/F4AucKe tx6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g11si3152512ile.43.2021.05.10.15.20.05; Mon, 10 May 2021 15:20:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231815AbhEJWUW (ORCPT + 99 others); Mon, 10 May 2021 18:20:22 -0400 Received: from mga02.intel.com ([134.134.136.20]:52294 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231807AbhEJWUU (ORCPT ); Mon, 10 May 2021 18:20:20 -0400 IronPort-SDR: IOLs2pMuMV2FlQhMyFbxacrl45NnJf565KqMVYGXOWQF5k9tfzc3R1VNRbTWns6sJFE1ulOLQl FdGIgOwd9OSQ== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="186434643" X-IronPort-AV: E=Sophos;i="5.82,288,1613462400"; d="scan'208";a="186434643" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 15:19:13 -0700 IronPort-SDR: OwFO49KfvhE+Xw8i3QMr4NJEKXZ6uegf/77SDYWuFvfKNGGoKGAr1tZQxOLN162Sfll5qeh5by 5QtqKWQqGH6g== X-IronPort-AV: E=Sophos;i="5.82,288,1613462400"; d="scan'208";a="609255395" Received: from kcmorris-mobl1.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.213.165.53]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 15:19:13 -0700 Subject: Re: [RFC v2 26/32] x86/mm: Move force_dma_unencrypted() to common code To: Dave Hansen , Peter Zijlstra , Andy Lutomirski , Dan Williams , Tony Luck Cc: Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org References: <7c5adf75d69ea327b22b404b7c37b29712d73640.1619458733.git.sathyanarayanan.kuppuswamy@linux.intel.com> <5536639a-918d-de8d-ff32-934a13902a03@intel.com> From: "Kuppuswamy, Sathyanarayanan" Message-ID: Date: Mon, 10 May 2021 15:19:10 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <5536639a-918d-de8d-ff32-934a13902a03@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/7/21 2:54 PM, Dave Hansen wrote: > This doesn't seem much like common code to me. It seems like 100% SEV > code. Is this really where we want to move it? Both SEV and TDX code has requirement to enable CONFIG_ARCH_HAS_FORCE_DMA_UNENCRYPTED and define force_dma_unencrypted() function. force_dma_unencrypted() is modified by patch titled "x86/tdx: Make DMA pages shared" to add TDX guest specific support. Since both SEV and TDX code uses it, its moved to common file. -- Sathyanarayanan Kuppuswamy Linux Kernel Developer