From: "H. Peter Anvin" <hpa@zytor.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, peterz@infradead.org
Subject: Re: [PATCH v2 0/6] Enable LKGS instruction
Date: Mon, 10 Oct 2022 17:59:34 -0700 [thread overview]
Message-ID: <4714a248-d80e-61fb-15a7-62ab247d2fe7@zytor.com> (raw)
In-Reply-To: <20221010190159.11920-1-xin3.li@intel.com>
On 10/10/22 12:01, Xin Li wrote:
> LKGS instruction is introduced with Intel FRED (flexible return and event
> delivery) specification https://cdrdv2.intel.com/v1/dl/getContent/678938.
>
> LKGS is independent of FRED, so we enable it as a standalone CPU feature.
>
> LKGS behaves like the MOV to GS instruction except that it loads the base
> address into the IA32_KERNEL_GS_BASE MSR instead of the GS segment’s
> descriptor cache, which is exactly what Linux kernel does to load user level
> GS base. Thus, with LKGS, there is no need to SWAPGS away from the kernel
> GS base.
>
> Changes since V1:
> * place fixup code into code section "__ex_table" instead of the obsoleted
> "fixup" section.
>
Correction: __ex_table is NOT a code section (scared me there for a
second...). With the new fixup handling code EX_TYPE_ZERO_REG takes care
of all the work, and there simply is no need for any fixup code at all
(the exception fixup is fully data-driven.)
So I would say "use EX_TYPE_ZERO_REG instead of fixup code in the
obsolete .fixup code section."
-hpa
next prev parent reply other threads:[~2022-10-11 1:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 19:01 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
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 ` H. Peter Anvin [this message]
2022-10-11 3:51 ` [PATCH v2 0/6] Enable LKGS instruction 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=4714a248-d80e-61fb-15a7-62ab247d2fe7@zytor.com \
--to=hpa@zytor.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.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
all inboxes | Powered by JetHome®