From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH v5 5/5] x86/kvm: Avoid dynamic allocation of pvclock data when SEV is active Date: Thu, 6 Sep 2018 16:44:44 +0200 Message-ID: <20180906144444.GC11144@zn.tnic> References: <1536234182-2809-1-git-send-email-brijesh.singh@amd.com> <1536234182-2809-6-git-send-email-brijesh.singh@amd.com> <20180906122423.GA11144@zn.tnic> <20180906135041.GB32336@linux.intel.com> <20180906141825.GB370@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Brijesh Singh , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Tom Lendacky , Thomas Gleixner , "H. Peter Anvin" , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= To: Sean Christopherson Return-path: Content-Disposition: inline In-Reply-To: <20180906141825.GB370@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, Sep 06, 2018 at 07:18:25AM -0700, Sean Christopherson wrote: > Oh, and we'd need to make sure __decrypted_exclusive is freed when > !CONFIG_AMD_MEM_ENCRYPT, and preferably !sev_active() since the big > array is used only if SEV is active. This patch unconditionally > defines hv_clock_dec but only frees it if CONFIG_AMD_MEM_ENCRYPT=y && > !mem_encrypt_active(). We should not go nuts and complicate the code only to save us a couple of KBs. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --