mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chang S. Bae" <chang.seok.bae@intel.com>
To: Xin Li <xin3.li@intel.com>, <linux-kernel@vger.kernel.org>,
	<x86@kernel.org>
Cc: <tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>,
	<dave.hansen@linux.intel.com>, <hpa@zytor.com>,
	<peterz@infradead.org>
Subject: Re: [PATCH v2 1/6] x86/cpufeature: add cpu feature bit for LKGS
Date: Tue, 11 Oct 2022 18:40:26 -0700	[thread overview]
Message-ID: <cca7e8ec-9fa0-7517-12d2-b0fd115bb9e9@intel.com> (raw)
In-Reply-To: <20221010190159.11920-2-xin3.li@intel.com>

On 10/10/2022 12:01 PM, Xin Li wrote:
> 
> diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
> index ef4775c6db01..459fb0c21dd4 100644
> --- a/arch/x86/include/asm/cpufeatures.h
> +++ b/arch/x86/include/asm/cpufeatures.h
> @@ -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 */

The spec says [1]:
     "Execution of LKGS causes an invalid-opcode exception (#UD) if CPL >
      0."

Perhaps userspace has no interest in this. Then, we can add "" not to 
show "lkgs" in /proc/cpuinfo:
     +#define X86_FEATURE_LKGS		(12*32+ 18) /* "" Load "kernel" 
(userspace) gs */

Thanks,
Chang

[1] https://cdrdv2.intel.com/v1/dl/getContent/678938

  reply	other threads:[~2022-10-12  1:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10 19:01 [PATCH v2 0/6] Enable LKGS instruction Xin Li
2022-10-10 19:01 ` [PATCH v2 1/6] x86/cpufeature: add cpu feature bit for LKGS Xin Li
2022-10-12  1:40   ` Chang S. Bae [this message]
2022-10-13 19:35     ` Li, Xin3
2022-10-13 20:05       ` H. Peter Anvin
2022-10-10 19:01 ` [PATCH v2 2/6] x86/opcode: add LKGS instruction to x86-opcode-map Xin Li
2022-10-10 19:01 ` [PATCH v2 3/6] x86/gsseg: make asm_load_gs_index() take an u16 Xin Li
2022-10-10 19:01 ` [PATCH v2 4/6] x86/gsseg: move local_irq_save/restore() into asm_load_gs_index() Xin Li
2022-10-10 19:01 ` [PATCH v2 5/6] x86/gsseg: move load_gs_index() to its own header file Xin Li
2022-10-10 19:01 ` [PATCH v2 6/6] x86/gsseg: use the LKGS instruction if available for load_gs_index() Xin Li
2022-10-11  3:51   ` Brian Gerst
2022-10-11  4:20     ` H. Peter Anvin
2022-10-11 17:12     ` Li, Xin3
2022-10-11  0:59 ` [PATCH v2 0/6] Enable LKGS instruction H. Peter Anvin
2022-10-11  3:51   ` Li, Xin3

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cca7e8ec-9fa0-7517-12d2-b0fd115bb9e9@intel.com \
    --to=chang.seok.bae@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xin3.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome