From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751552AbdI1Ucd (ORCPT ); Thu, 28 Sep 2017 16:32:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:60437 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751008AbdI1Ucc (ORCPT ); Thu, 28 Sep 2017 16:32:32 -0400 Date: Thu, 28 Sep 2017 22:32:19 +0200 From: Borislav Petkov To: Brijesh Singh Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Arnd Bergmann , Tejun Heo , Christoph Lameter , linux-arch@vger.kernel.org, Tom Lendacky Subject: Re: [Part1 PATCH v5 15/17] percpu: Introduce DEFINE_PER_CPU_DECRYPTED Message-ID: <20170928203219.7xzy3cnzgdraaic3@pd.tnic> References: <20170927151329.70011-1-brijesh.singh@amd.com> <20170927151329.70011-16-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170927151329.70011-16-brijesh.singh@amd.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 27, 2017 at 10:13:27AM -0500, Brijesh Singh wrote: > KVM guest defines three per-CPU variables (steal-time, apf_reason, and > avic_eio) which are shared between a guest and a hypervisor. When SEV > is active, memory is encrypted with a guest-specific key, and if the > guest OS wants to share the memory region with the hypervisor then it > must clear the C-bit (i.e set decrypted) before sharing it. > > DEFINE_PER_CPU_DECRYPTED can be used to define the per-CPU variables > which will be shared between a guest and a hypervisor. > > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: "H. Peter Anvin" > Cc: Borislav Petkov > Cc: Arnd Bergmann > Cc: Tejun Heo > Cc: Christoph Lameter > Cc: linux-arch@vger.kernel.org > Cc: x86@kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: Tom Lendacky > Signed-off-by: Brijesh Singh > Acked-by: Tejun Heo > --- > include/asm-generic/vmlinux.lds.h | 19 +++++++++++++++++++ > include/linux/percpu-defs.h | 15 +++++++++++++++ > 2 files changed, 34 insertions(+) Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --