From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58E7EC433F5 for ; Tue, 14 Dec 2021 19:10:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237329AbhLNTKR (ORCPT ); Tue, 14 Dec 2021 14:10:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231995AbhLNTKQ (ORCPT ); Tue, 14 Dec 2021 14:10:16 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FCFFC061574; Tue, 14 Dec 2021 11:10:16 -0800 (PST) Received: from zn.tnic (dslb-088-067-202-008.088.067.pools.vodafone-ip.de [88.67.202.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id C80461EC02AD; Tue, 14 Dec 2021 20:10:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1639509010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=DI2vukmIvxeB24qycMTvikeEQ9/5m2LSUmK7BFY/UXc=; b=iYY1nA/6HMelMQmtlpVuYveRU5HkIKZWb/btW1eVmU8/1GVzhoLzagRE2znZsMCw1LsF4x Sy+YxuDjLUl1PYTFSjvZRBrffZF00IUbhZUYVe8ceJtpeQ2+GFh1DPllxpKzX7R8OySXr6 bLYmZvn3Lo8z7CwK9yueRQyYm37ePi0= Date: Tue, 14 Dec 2021 20:10:16 +0100 From: Borislav Petkov To: Venu Busireddy Cc: Brijesh Singh , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Michael Roth , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , "Dr . David Alan Gilbert" , tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH v8 01/40] x86/compressed/64: detect/setup SEV/SME features earlier in boot Message-ID: References: <20211210154332.11526-1-brijesh.singh@amd.com> <20211210154332.11526-2-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Tue, Dec 14, 2021 at 11:46:14AM -0600, Venu Busireddy wrote: > What I am suggesting should not have anything to do with the boot stage > of the kernel. I know exactly what you're suggesting. > For example, both these functions call native_cpuid(), which is declared > as an inline function. I am merely suggesting to do something similar > to avoid the code duplication. Try it yourself. If you can come up with something halfway readable and it builds, I'm willing to take a look. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette