From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-eopbgr680045.outbound.protection.outlook.com ([40.107.68.45]:58091 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727484AbeH2TwT (ORCPT ); Wed, 29 Aug 2018 15:52:19 -0400 Cc: brijesh.singh@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, stable@vger.kernel.org, Tom Lendacky , Thomas Gleixner , "H. Peter Anvin" , Paolo Bonzini , Sean Christopherson , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Subject: Re: [PATCH v2 2/3] x86/mm: add .data..decrypted section to hold shared variables To: Borislav Petkov References: <1535494377-25600-1-git-send-email-brijesh.singh@amd.com> <1535494377-25600-3-git-send-email-brijesh.singh@amd.com> <20180829135949.GF6337@nazgul.tnic> From: Brijesh Singh Message-ID: <9a4c2d09-3074-20dc-8801-81fa082148fa@amd.com> Date: Wed, 29 Aug 2018 10:54:37 -0500 MIME-Version: 1.0 In-Reply-To: <20180829135949.GF6337@nazgul.tnic> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: Hi Boris, On 08/29/2018 08:59 AM, Borislav Petkov wrote: ... > >> static void __init __sme_map_range_pmd(struct sme_populate_pgd_data *ppd) >> @@ -235,6 +235,11 @@ static void __init sme_map_range_encrypted(struct sme_populate_pgd_data *ppd) >> __sme_map_range(ppd, PMD_FLAGS_ENC, PTE_FLAGS_ENC); >> } >> >> +static void __init sme_map_range_encrypted_wp(struct sme_populate_pgd_data *ppd) >> +{ >> + __sme_map_range(ppd, PMD_FLAGS_ENC_WP, PTE_FLAGS_ENC_WP); >> +} >> + >> static void __init sme_map_range_decrypted(struct sme_populate_pgd_data *ppd) >> { >> __sme_map_range(ppd, PMD_FLAGS_DEC, PTE_FLAGS_DEC); > > These changes with the _WP flags and helper addition belong in a pre-patch. > Please note that the _WP flags and helper functions are used by this patch only. Introducing a helper in a separate patch will cause a build warning. I am leaning to keep the helper in this patch but if you think it should be done in separate patch then let me know. -Brijesh