Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1713696 > unrolled thread
| Started by | Ingo Molnar <mingo@kernel.org> |
|---|---|
| First post | 2017-08-17 11:10 +0200 |
| Last post | 2017-08-17 11:10 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCHv4 09/14] x86/mm: Handle boot-time paging mode switching at early boot Ingo Molnar <mingo@kernel.org> - 2017-08-17 11:10 +0200
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2017-08-17 11:10 +0200 |
| Subject | Re: [PATCHv4 09/14] x86/mm: Handle boot-time paging mode switching at early boot |
| Message-ID | <ufoYr-2Kf-61@gated-at.bofh.it> |
* Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote: > /* Prepare to add new identity pagetables on demand. */ > diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S > index daf8936d0628..077e8b45784c 100644 > --- a/arch/x86/entry/entry_64.S > +++ b/arch/x86/entry/entry_64.S > @@ -273,8 +273,20 @@ return_from_SYSCALL_64: > * Change top bits to match most significant bit (47th or 56th bit > * depending on paging mode) in the address. > */ > +#ifdef CONFIG_X86_5LEVEL > + testl $1, p4d_folded(%rip) > + jnz 1f > + shl $(64 - 57), %rcx > + sar $(64 - 57), %rcx > + jmp 2f > +1: > + shl $(64 - 48), %rcx > + sar $(64 - 48), %rcx > +2: > +#else > shl $(64 - (__VIRTUAL_MASK_SHIFT+1)), %rcx > sar $(64 - (__VIRTUAL_MASK_SHIFT+1)), %rcx > +#endif So I really, really hate this change, as it slows down everything, not just LA57 hardware, and slows down a critical system call hot path. (I expect enterprise distros to enable CONFIG_X86_5LEVEL.) Could this use alternatives patching instead? Thanks, Ingo
Back to top | Article view | linux.kernel
csiph-web