From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH v6 4/5] x86/kvm: use __decrypted attribute in shared variables Date: Mon, 10 Sep 2018 14:04:16 +0200 Message-ID: <20180910120416.GD21815@zn.tnic> References: <1536343050-18532-1-git-send-email-brijesh.singh@amd.com> <1536343050-18532-5-git-send-email-brijesh.singh@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Tom Lendacky , Thomas Gleixner , "H. Peter Anvin" , Paolo Bonzini , Sean Christopherson , Radim =?utf-8?B?S3LEjW3DocWZ?= To: Brijesh Singh Return-path: Content-Disposition: inline In-Reply-To: <1536343050-18532-5-git-send-email-brijesh.singh@amd.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, Sep 07, 2018 at 12:57:29PM -0500, Brijesh Singh wrote: > Commit: 368a540e0232 (x86/kvmclock: Remove memblock dependency) > caused SEV guest regression. When mentioning a commit in the commit message, put it on a separate line, like this: "Commit 368a540e0232 (x86/kvmclock: Remove memblock dependency) caused a SEV guest regression." > When SEV is active, we map the shared Use passive tone in your commit message: no "we", etc... > variables (wall_clock and hv_clock_boot) with C=0 to ensure that both > the guest and the hypervisor are able to access the data. To map the > variables we use kernel_physical_mapping_init() to split the large pages, "... to potentially split large pages used for that mapping... " > but splitting large pages requires allocating a new PMD, which fails now > that kvmclock initialization is called early during boot. "... before the memblock allocator is initialized." > Recently we added a special .data..decrypted section to hold the shared > variables. You don't really need that sentence. > This section is mapped with C=0 early during boot. Use > __decrypted attribute to put the wall_clock and hv_clock_boot in > .data..decrypted section so that they are mapped with C=0. "... so that they're mapped decrypted." Readers don't care about C=0 - they simply wanna know what C=0 represents, i.e., memory is not encrypted. With that: Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --