Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp432516pxb; Thu, 19 Aug 2021 03:07:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxNy64ubiVtRO9hwgsZgZOEscOMybxiVDWSYfknyGslLUh6RQzotDgBD3G7DXud/F3bwlE X-Received: by 2002:a5d:9b99:: with SMTP id r25mr11022858iom.104.1629367668710; Thu, 19 Aug 2021 03:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629367668; cv=none; d=google.com; s=arc-20160816; b=E4L0cfTzXjaVBRnWPgnfNcVpTgrknN1/Z0DwyDEJ51RY0SxklLCzGf36f527885WBg FscQXCDs3bG2azZuG+2OLEA9VM5RRu3Hz8wCk42+cAIy9eLCg1Frt7h1XpXkK2welyCT pYKoDy9ngM0ZjHl1uDB+cXOXjJqsWlcidByqJbdpovA3mQtWOe3F/T6jbheIhMZfPM/J SHpqC49N8wurA+/eT6UqkqQ41MImfKTU920IvpsTDn88KACZZBbGBeLJ1ad5W4UX2V/T eNJ8DTXzDwEheABeyufiBnZeUIvkaCOJbwcfpwH9tGGYgW2T43l0yeJYrAzWsM0qyxOY VxoQ== 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=sk5ZD+uyIjjDf0+aatLf0S7xfivyYV6bPrM1F6VipEk=; b=woZ8I/KGlbfBoy6Wu6nTo6ZOCfA2aCveAO3idnsfTJQs4j9iKDqv6bjxALTPxTbEq2 3xnm7pAx6WEhhoyed+3F7iAMw9ktGrYYRZqjwd2txDnp9it47USXOKsgqNhP476f79RE feko+YBaZ6dbLDhDX663jpLtdzDOqpmgWtQAmSRN7rzp7MAhv/9oaSiuchNCHPfohYOf h9jbNSgaKKLftuRstrlC8o523+BlD29IX23JzUW+eKsjxqGPbmiwT8ABFzCxyAtAxc/b OMU/hH+WlgWEvjg+dXOuuDVexTvveoAuzRFdpljRU6xF67MnRYJ5kVJmJzUSywBTMPqs RMQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Y6FVeyAY; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si2830561ile.129.2021.08.19.03.07.27; Thu, 19 Aug 2021 03:07:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Y6FVeyAY; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 S238005AbhHSKIA (ORCPT + 99 others); Thu, 19 Aug 2021 06:08:00 -0400 Received: from mail.skyhub.de ([5.9.137.197]:39222 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237746AbhHSKH7 (ORCPT ); Thu, 19 Aug 2021 06:07:59 -0400 Received: from zn.tnic (p200300ec2f0f6a00d82486aa7bad8753.dip0.t-ipconnect.de [IPv6:2003:ec:2f0f:6a00:d824:86aa:7bad:8753]) (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 2673C1EC046C; Thu, 19 Aug 2021 12:07:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1629367638; 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=sk5ZD+uyIjjDf0+aatLf0S7xfivyYV6bPrM1F6VipEk=; b=Y6FVeyAYXMeHPizyC5o6zJzLiuV/IhxAjDLo6FCKzcMLEDjVwawaEoZEfI1d09NV3g86Gb /OHjrCMIO3pHa/Hz0SpocJgGnMVprSJh/GXv8fp4B/pnD1yoxoo989RTjkJxcEffrshvM/ o18P6GSHp4ATumKPb7v6v2tacColPgw= Date: Thu, 19 Aug 2021 12:07:56 +0200 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, linux-crypto@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , 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 , tony.luck@intel.com, brijesh.ksingh@gmail.com Subject: Re: [PATCH Part1 RFC v4 23/36] KVM: x86: move lookup of indexed CPUID leafs to helper Message-ID: References: <20210707181506.30489-1-brijesh.singh@amd.com> <20210707181506.30489-24-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210707181506.30489-24-brijesh.singh@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Jul 07, 2021 at 01:14:53PM -0500, 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. > > Signed-off-by: Michael Roth > Signed-off-by: Brijesh Singh > --- > arch/x86/include/asm/cpuid-indexed.h | 26 ++++++++++++++++++++++++++ > arch/x86/kvm/cpuid.c | 17 ++--------------- > 2 files changed, 28 insertions(+), 15 deletions(-) > create mode 100644 arch/x86/include/asm/cpuid-indexed.h > > diff --git a/arch/x86/include/asm/cpuid-indexed.h b/arch/x86/include/asm/cpuid-indexed.h > new file mode 100644 > index 000000000000..f5ab746f5712 > --- /dev/null > +++ b/arch/x86/include/asm/cpuid-indexed.h Just call it arch/x86/include/asm/cpuid.h And if you feel bored, you can move the cpuid* primitives from asm/processor.h to it, in another patch so that processor.h gets slimmer. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette