Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1462905rwi; Thu, 13 Oct 2022 14:10:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5yJxvl9fQJQJ30qH68QdrNuMJ5H0A4HJNl6hH6TV5PWXWknRRT75N8U/mblaRsPPGqxtZk X-Received: by 2002:a17:907:78a:b0:78d:9ac7:b697 with SMTP id xd10-20020a170907078a00b0078d9ac7b697mr1190375ejb.457.1665695429484; Thu, 13 Oct 2022 14:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665695429; cv=none; d=google.com; s=arc-20160816; b=yma+yXaheetsvBl70BLsjlBpWATGxIbMNjr1dprqGlRN39c+gEoymCd3GeKNtXUCUy iwX6HfcZ3fU4wLfg0FCs2XWXOQe6Y7mbC6yH1vPDnEce22mNKPIH8hrYITlV0YGxmk4Q 3iCVyCylZcSnusLsLE7aYjb46DtA6df45dxzAl+LikWcTUIrvACVUT0BPATmdoT1YF87 qHmU9VrXCth1vxGZp+mE7rgha9mm66mfHExaG6xSGhQdjVANSh0bPSe5YqArHPobFLLI PyE9U1K+ElQ/Mwts1NrDn2GAXFYVbLxOxqFuLGU1M8wUABag7JTjr9/xEzJcwTLFQSz3 3Vfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:references:in-reply-to:user-agent:subject:cc:to:from :date:dkim-signature:dkim-filter; bh=YqCkWQXDmcvlk06J1T5EwAK+3U0wNkOzu/L8Ng5Da7A=; b=l3+Vq/Lb5vj8X+yjHz2Ibdd/jvQsOYkYxzfw0CavtqmSTy0Fmilt8gVdpkCBvJSFpN pN0PSAsdXDbev7Jt8Pv407o6sjH3svGJpN410GH399T6fEFVu9sg+J/95CBbz/ohfkDn XC7871UVLXkmnQ2MoLaiYmc5+JaaA/B3sKB4yHA6RycHg34lQR772RnrgNwWVHfyVZIV kBEoSoJdsBFP/6oes/I6RNkWHpZytXMLG2sSPKLPlyGkIrCXfNDcCXCp3EaQR6MaYj+8 Y2YpFuui8y3oFdH3D8HCLFNMq+i/W+AKtWD/jCYuGaMk/1/ny12Atebh2Uc6kZjG3sBn JaQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2022100601 header.b="CZvj/G9m"; 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=zytor.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga40-20020a1709070c2800b007882936242fsi760745ejc.769.2022.10.13.14.10.04; Thu, 13 Oct 2022 14:10:29 -0700 (PDT) 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=@zytor.com header.s=2022100601 header.b="CZvj/G9m"; 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=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229713AbiJMUGB (ORCPT + 99 others); Thu, 13 Oct 2022 16:06:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbiJMUF7 (ORCPT ); Thu, 13 Oct 2022 16:05:59 -0400 Received: from mail.zytor.com (unknown [IPv6:2607:7c80:54:3::138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0C841DA74 for ; Thu, 13 Oct 2022 13:05:56 -0700 (PDT) Received: from [127.0.0.1] ([73.223.250.219]) (authenticated bits=0) by mail.zytor.com (8.17.1/8.17.1) with ESMTPSA id 29DK5D9b802665 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Thu, 13 Oct 2022 13:05:13 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 29DK5D9b802665 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2022100601; t=1665691514; bh=YqCkWQXDmcvlk06J1T5EwAK+3U0wNkOzu/L8Ng5Da7A=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=CZvj/G9muvf9RB1GfomyE5B9R5wIj03WWOnCLRiG/c/e8PeiURqkuFQokrrxfmIwl I36VH2kHTw5tibHjuQDidOD3DUICrOCkp/UoSTRrxGvT8JFxVzy5lNoetnsZawALqA +J7S4VQU4jzQJFfuqPd0p3hs6vRiHXVYjBcqMqSiK1oPqIJyKsrVURAGEC4bdWfu64 Ryd+u2Hfjl96pEUoQ6GIH7yUa99MCmal4vSgnww/sqIbriZ7g9LR++CrRKITqfsI8w vxU17QiK9GM+nIInD30Iw/UF62mr2+GdJs4U+lTHZTev87xLe0ijAdsmZ6fQ8npeqC VTJnE0e6yuMqg== Date: Thu, 13 Oct 2022 13:05:09 -0700 From: "H. Peter Anvin" To: "Li, Xin3" , "Bae, Chang Seok" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" CC: "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "peterz@infradead.org" Subject: RE: [PATCH v2 1/6] x86/cpufeature: add cpu feature bit for LKGS User-Agent: K-9 Mail for Android In-Reply-To: References: <20221010190159.11920-1-xin3.li@intel.com> <20221010190159.11920-2-xin3.li@intel.com> Message-ID: <69F8F5CF-D939-4AC1-A691-06DD15746F1C@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RDNS_NONE,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On October 13, 2022 12:35:23 PM PDT, "Li, Xin3" wro= te: > >> > diff --git a/arch/x86/include/asm/cpufeatures=2Eh >> > b/arch/x86/include/asm/cpufeatures=2Eh >> > index ef4775c6db01=2E=2E459fb0c21dd4 100644 >> > --- a/arch/x86/include/asm/cpufeatures=2Eh >> > +++ b/arch/x86/include/asm/cpufeatures=2Eh >> > @@ -308,6 +308,7 @@ >> > /* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word= 12 */ >> > #define X86_FEATURE_AVX_VNNI (12*32+ 4) /* AVX VNNI >> instructions */ >> > #define X86_FEATURE_AVX512_BF16 (12*32+ 5) /* AVX512 >> BFLOAT16 instructions */ >> > +#define X86_FEATURE_LKGS (12*32+ 18) /* Load "kernel" >> (userspace) gs */ >>=20 >> The spec says [1]: >> "Execution of LKGS causes an invalid-opcode exception (#UD) if CPL= > >> 0=2E" >>=20 >> Perhaps userspace has no interest in this=2E Then, we can add "" not to= show >> "lkgs" in /proc/cpuinfo: >> +#define X86_FEATURE_LKGS (12*32+ 18) /* "" Load "kernel" >> (userspace) gs */ > >Good point! > >>=20 >> Thanks, >> Chang >>=20 >> [1] https://cdrdv2=2Eintel=2Ecom/v1/dl/getContent/678938 > It would be useful for reviewers to mention that this is was a policy chan= ge on the maintainers' part=2E This is totally valid, of course, but making= it explicit would perhaps help reduce potential confusion=2E