Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753976AbdIDRFc (ORCPT ); Mon, 4 Sep 2017 13:05:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:45043 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753847AbdIDRFa (ORCPT ); Mon, 4 Sep 2017 13:05:30 -0400 Date: Mon, 4 Sep 2017 19:05:25 +0200 From: Borislav Petkov To: Brijesh Singh Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-efi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Andy Lutomirski , Tony Luck , Piotr Luc , Tom Lendacky , Fenghua Yu , Reza Arbab , David Howells , Matt Fleming , "Kirill A . Shutemov" , Laura Abbott , Ard Biesheuvel , Andrew Morton , Eric Biederman , Benjamin Herrenschmidt , Paul Mackerras , Konrad Rzeszutek Wilk , Jonathan Corbet , Dave Airlie , Kees Cook , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Arnd Bergmann , Tejun Heo , Christoph Lameter Subject: Re: [RFC Part1 PATCH v3 16/17] X86/KVM: Provide support to create Guest and HV shared per-CPU variables Message-ID: <20170904170525.toyulxwaevef42qe@pd.tnic> References: <20170724190757.11278-1-brijesh.singh@amd.com> <20170724190757.11278-17-brijesh.singh@amd.com> <20170829102258.gxk227js4yw47qi3@pd.tnic> <0810a732-9c77-a543-ffeb-7fd2d8f46266@amd.com> <20170830174655.ehrnmynotmp7laka@pd.tnic> <8155b5b2-b2b3-bc8f-33ae-b81b661a2e38@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8155b5b2-b2b3-bc8f-33ae-b81b661a2e38@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 Content-Length: 908 Lines: 32 On Fri, Sep 01, 2017 at 05:52:13PM -0500, Brijesh Singh wrote: > So far, we have not seen the need for having such functions except > this cases. The approach we have right now works just fine and not > sure if its worth adding new functions. Then put the call to kvm_map_hv_shared_decrypted() into kvm_smp_prepare_boot_cpu() to denote that you're executing this whole stuff only once during guest init. Now you're doing additional jumping-through-hoops with that once static var just so you can force something which needs to execute only once but gets called in a per-CPU path. See what I mean? > Thoughts ? > > [1] Commit :7f8b7e7 x86/mm: Add support for early encryption/decryption of memory Add [core] abbrev = 12 to the core section of your .gitconfig. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --