From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95891C433B4 for ; Tue, 18 May 2021 01:28:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6F10661354 for ; Tue, 18 May 2021 01:28:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345702AbhERB3n (ORCPT ); Mon, 17 May 2021 21:29:43 -0400 Received: from mga02.intel.com ([134.134.136.20]:13300 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238837AbhERB3j (ORCPT ); Mon, 17 May 2021 21:29:39 -0400 IronPort-SDR: tEvjIvfrgFJjJUx1xt+0fsvVAIeEomVfydwtOMuYY0FY0FlLqx4pUCB6Zk8VuDcIzjZ/qaLFTa jHwO1dCr5ZyQ== X-IronPort-AV: E=McAfee;i="6200,9189,9987"; a="187726196" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="187726196" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 18:28:21 -0700 IronPort-SDR: 0I+rcgnDeonHdD/d7iTPjfW5H7ayFimgwxnNWPEp7mdzL3sHXrDKDs3jqAoN3iV3OOfDCu5wcC pvMeSR16kBKA== X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="543903784" Received: from daltonda-mobl.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.209.182.28]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 18:28:16 -0700 Subject: Re: [RFC v2 26/32] x86/mm: Move force_dma_unencrypted() to common code To: Dave Hansen , "Kirill A. Shutemov" Cc: Peter Zijlstra , Andy Lutomirski , Dan Williams , Tony Luck , 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> <20210512130821.7r2rtzcyjltecun7@box.shutemov.name> From: "Kuppuswamy, Sathyanarayanan" Message-ID: <3ad7a35d-45f2-9c62-23cd-3b7a167c5d83@linux.intel.com> Date: Mon, 17 May 2021 18:28:11 -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: 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/12/21 8:44 AM, Dave Hansen wrote: > Because the code is already separate. You're actually going to some > trouble to move the SEV-specific code and then combine it with the > TDX-specific code. > > Anyway, please just give it a shot. Should take all of ten minutes. If > it doesn't work out in practice, fine. You'll have a good paragraph for > the changelog. After reviewing the code again, I have noticed that we don't really have much common code between AMD and TDX. So I don't see any justification for creating this common layer. So, I have decided to drop this patch and move Intel TDX specific memory encryption init code to patch titled "[RFC v2 30/32] x86/tdx: Make DMA pages shared". This model is similar to how AMD-SEV does the initialization. I have sent the modified patch as reply to patch titled "[RFC v2 30/32] x86/tdx: Make DMA pages shared". Please check and let me know your comments. -- Sathyanarayanan Kuppuswamy Linux Kernel Developer