Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp112714pxb; Mon, 7 Feb 2022 07:27:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMDfVghPgXv1bYIJVmMD6x2uqhzOW5DZ4aKd/AiXpb7PG2vjMQxBKdckmMfxE/KKcMevky X-Received: by 2002:a05:6402:134f:: with SMTP id y15mr14224759edw.317.1644247651002; Mon, 07 Feb 2022 07:27:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644247650; cv=none; d=google.com; s=arc-20160816; b=jPWsC4PTXYwqF+gJtwfAYI+HYtxQGgzZydpyUnNmcP+s2/kVA2xZyBT054FE1T7vd+ UQrWdnt3LTYVEpoWopy4fPJ8tFXxjF3N1Pomk/RY8hAGJxwJ6FJC3bd1lVbGc92qGNjC McgYCvkoiEx2jwxGZ/Ane3AMs67xCo4aeiaszaeNlauir5RmF4lBNd11nU8Hu/PNdjDf TJYpT0iaWua6lOAcAk5ysP8ouOVunEkLLziIdDsbMC07l56N0IeT05zL/rSRICz+h+Wz IS4tAWJ8uAPDVE41WWKsUrHVfrXOHljOAhZJOiTdizTQuIvTyivDi4Ir5eDP3SYHjYuH SktA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yg+soGFEUKSbxLOHDIvcVK6A2p0O5VjkYxKG83vqchE=; b=TlMU6/xKUXqdjXKSfnNz4aEnrllx3QjHsZh2jN7hORJuX36sYia5yYN++FjWo/AaAP 7yNTCFVsir15kuO8F268mdsLIROTdXTkKsG1rVv2ky1yafJ1BIzmAZ9XjXunieQ1pyYq JMhBTrDEkL4jybgko++HwOsayZMWKJTpJ7yLIpxyva397Z2/S1fXLKQlrH47Sxu1OZYO vqLuqrhVTXGNhU7ArBcCFPvgR4Yak3FQ55ziEryvV5VY9adPjPVkuHQkrEh4xF3b0HVt 6yVuv59/qaZoDrNh1L/RokWau5a1zrWUBHYwzSKJwrjiNCiJycGyVFycH6O6OUqO/YCk 40mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=C539Dr+f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ji7si7870409ejc.39.2022.02.07.07.27.04; Mon, 07 Feb 2022 07:27:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=C539Dr+f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235121AbiBCPQm (ORCPT + 99 others); Thu, 3 Feb 2022 10:16:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238484AbiBCPQk (ORCPT ); Thu, 3 Feb 2022 10:16:40 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7CA9C061714; Thu, 3 Feb 2022 07:16:39 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (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 4E9311EC052A; Thu, 3 Feb 2022 16:16:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1643901394; 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=yg+soGFEUKSbxLOHDIvcVK6A2p0O5VjkYxKG83vqchE=; b=C539Dr+f4cCq60tPa3aZj/xVx2yPOJH7EBjcb6UDpKQ5/7YFd/MWP4EhkVDwmv3F4ZxZOn VY+0Ja1hfKp9LnGIsarzSoAOGiwMI70e2EVVxG1NbCo6FiJDYVFxTN2PsLbCFC92Uqyvcw dcJdG8k4LlUmuEl1K7vl11Ism3AMLq8= Date: Thu, 3 Feb 2022 16:16:33 +0100 From: Borislav Petkov To: Brijesh Singh Cc: 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" , brijesh.ksingh@gmail.com, tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com, Venu Busireddy Subject: Re: [PATCH v9 23/43] KVM: x86: Move lookup of indexed CPUID leafs to helper Message-ID: References: <20220128171804.569796-1-brijesh.singh@amd.com> <20220128171804.569796-24-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220128171804.569796-24-brijesh.singh@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 28, 2022 at 11:17:44AM -0600, Brijesh Singh wrote: > From: Michael Roth > > Determining which CPUID leafs have significant ECX/index values is > also needed by guest kernel code when doing SEV-SNP-validated CPUID > lookups. Move this to common code to keep future updates in sync. > > Reviewed-by: Venu Busireddy > Signed-off-by: Michael Roth > Signed-off-by: Brijesh Singh > --- > arch/x86/include/asm/cpuid.h | 38 ++++++++++++++++++++++++++++++++++++ > arch/x86/kvm/cpuid.c | 19 ++---------------- > 2 files changed, 40 insertions(+), 17 deletions(-) > create mode 100644 arch/x86/include/asm/cpuid.h > > diff --git a/arch/x86/include/asm/cpuid.h b/arch/x86/include/asm/cpuid.h > new file mode 100644 > index 000000000000..00408aded67c > --- /dev/null > +++ b/arch/x86/include/asm/cpuid.h > @@ -0,0 +1,38 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Kernel-based Virtual Machine driver for Linux cpuid support routines > + * > + * derived from arch/x86/kvm/x86.c > + * derived from arch/x86/kvm/cpuid.c > + * > + * Copyright 2011 Red Hat, Inc. and/or its affiliates. > + * Copyright IBM Corporation, 2008 > + */ I have no clue what you're trying to achieve by copying the copyright of the file this comes from. As dhansen properly points out, those lines in that function come from other folks/companies too so why even bother with this? git history holds the correct and full copyright anyway... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette