From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934228AbeAXPwd (ORCPT ); Wed, 24 Jan 2018 10:52:33 -0500 Received: from mga01.intel.com ([192.55.52.88]:23800 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933953AbeAXPwb (ORCPT ); Wed, 24 Jan 2018 10:52:31 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,408,1511856000"; d="scan'208";a="24382996" Date: Wed, 24 Jan 2018 18:52:27 +0300 From: "Kirill A. Shutemov" To: Tom Lendacky Cc: Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Linus Torvalds , Borislav Petkov , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] x86/mm/encrypt: Move sme_populate_pgd*() into separate translation unit Message-ID: <20180124155227.wg7itpohsvd2i7wt@black.fi.intel.com> References: <20180123171910.55841-1-kirill.shutemov@linux.intel.com> <20180123171910.55841-2-kirill.shutemov@linux.intel.com> <1dee5138-fe8e-70ec-61d1-86f802e68e7c@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1dee5138-fe8e-70ec-61d1-86f802e68e7c@amd.com> User-Agent: NeoMutt/20170714-126-deb55f (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 24, 2018 at 02:59:58PM +0000, Tom Lendacky wrote: > > static void __init sme_clear_pgd(struct sme_populate_pgd_data *ppd) > > If you're going to move some of the functions, did you look at moving the > sme_enable(), sme_encrypt_kernel(), etc., too? I believe everything below > the sme_populate_pgd_data structure is used during early identity-mapped > boot time. If you move everything, then mm_internal.h doesn't need to be > updated and all of the identity-mapped early boot code ends up in one > file. > > You'd have to move the command line declarations and make sev_enabled > not a static, but it should be doable. I moved minimum of the code to get the trick work, but I'll look into moving move there. -- Kirill A. Shutemov