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 B6676C433FE for ; Thu, 3 Feb 2022 15:16:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351739AbiBCPQk (ORCPT ); Thu, 3 Feb 2022 10:16:40 -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-efi@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