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 3F987ECAAD8 for ; Wed, 21 Sep 2022 16:26:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232112AbiIUQ0r (ORCPT ); Wed, 21 Sep 2022 12:26:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbiIUQ0X (ORCPT ); Wed, 21 Sep 2022 12:26:23 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6698A5709; Wed, 21 Sep 2022 09:09:18 -0700 (PDT) Received: from zn.tnic (p200300ea9733e77f329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e77f:329c:23ff:fea6:a903]) (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 6BAB71EC05DE; Wed, 21 Sep 2022 18:07:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1663776431; 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=LF62L5JnveC0NnOJbQNf2E4BueK3qIrzPtCOa4tW7jc=; b=jbp8atHUTuocYg/a9SuXYpsQj1hHAqRBvHw9B8ANYKC1PVfOwd3jEDeZhIsOkUdx2glnlw VDpC9JlLXobU1vjVhNnYcqSpXdCNtl9AqOeGb0jv9K3CUdgwLsemqhWEqeQMu0xwZX0HNK FyzRLGkZeR7H3Vvc+VtkHEtHe+PGgwQ= Date: Wed, 21 Sep 2022 18:07:11 +0200 From: Borislav Petkov To: Jim Mattson Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Sean Christopherson , Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH v2 2/3] x86/cpufeatures: Introduce X86_FEATURE_NO_LMSLE Message-ID: References: <20220920205922.1564814-1-jmattson@google.com> <20220920205922.1564814-3-jmattson@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220920205922.1564814-3-jmattson@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 20, 2022 at 01:59:21PM -0700, Jim Mattson wrote: > When AMD introduced "Long Mode Segment Limit Enable" (a.k.a. "VMware > mode"), the feature was not enumerated by a CPUID bit. Now that VMware > has abandoned binary translation, AMD has deprecated EFER.LMSLE. > > The absence of the feature *is* now enumerated by a CPUID bit (a la > Intel's X86_FEATURE_ZERO_FCS_DCS and X86_FEATURE_FDP_EXCPTN_ONLY). > > This defeature bit is already present in feature word 13, but it was > previously anonymous. Name it X86_FEATURE_NO_LMSLE, so that KVM can > reference it when constructing a supported guest CPUID table. > > Since this bit indicates the absence of a feature, don't enumerate it > in /proc/cpuinfo. > > Signed-off-by: Jim Mattson > --- > arch/x86/include/asm/cpufeatures.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h > index ef4775c6db01..0f5a3285d8d8 100644 > --- a/arch/x86/include/asm/cpufeatures.h > +++ b/arch/x86/include/asm/cpufeatures.h > @@ -319,6 +319,7 @@ > #define X86_FEATURE_AMD_IBRS (13*32+14) /* "" Indirect Branch Restricted Speculation */ > #define X86_FEATURE_AMD_STIBP (13*32+15) /* "" Single Thread Indirect Branch Predictors */ > #define X86_FEATURE_AMD_STIBP_ALWAYS_ON (13*32+17) /* "" Single Thread Indirect Branch Predictors always-on preferred */ > +#define X86_FEATURE_NO_LMSLE (13*32+20) /* "" EFER_LMSLE is unsupported */ > #define X86_FEATURE_AMD_PPIN (13*32+23) /* Protected Processor Inventory Number */ > #define X86_FEATURE_AMD_SSBD (13*32+24) /* "" Speculative Store Bypass Disable */ > #define X86_FEATURE_VIRT_SSBD (13*32+25) /* Virtualized Speculative Store Bypass Disable */ > -- Acked-by: Borislav Petkov -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette