Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1616873 > unrolled thread
| Started by | "Kirill A. Shutemov" <kirill@shutemov.name> |
|---|---|
| First post | 2017-04-05 14:10 +0200 |
| Last post | 2017-04-05 17:40 +0200 |
| Articles | 2 — 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: [PATCH 21/26] x86/mm: add support of additional page table level during early boot "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-04-05 14:10 +0200
Re: [PATCH 21/26] x86/mm: add support of additional page table level during early boot "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-04-05 17:40 +0200
| From | "Kirill A. Shutemov" <kirill@shutemov.name> |
|---|---|
| Date | 2017-04-05 14:10 +0200 |
| Subject | Re: [PATCH 21/26] x86/mm: add support of additional page table level during early boot |
| Message-ID | <tsRV7-2sp-3@gated-at.bofh.it> |
On Mon, Mar 13, 2017 at 08:18:10AM +0100, Ingo Molnar wrote: > > * Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote: > > > This patch adds support for 5-level paging during early boot. > > It generalizes boot for 4- and 5-level paging on 64-bit systems with > > compile-time switch between them. > > > > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> > > --- > > arch/x86/boot/compressed/head_64.S | 23 +++++++++-- > > arch/x86/include/asm/pgtable.h | 2 +- > > arch/x86/include/asm/pgtable_64.h | 6 ++- > > arch/x86/include/uapi/asm/processor-flags.h | 2 + > > arch/x86/kernel/espfix_64.c | 2 +- > > arch/x86/kernel/head64.c | 40 +++++++++++++----- > > arch/x86/kernel/head_64.S | 63 +++++++++++++++++++++-------- > > Ok, here I'd like to have a C version instead of further complicating an already > complex assembly version... Just head up: I work on this. It's great deal of frustration (I can't really read assembly), but I'm slowly moving forward. Most of logic in startup_64 in arch/x86/kernel/head_64.S is converted to C. Dealing with secondary_startup_64 now. Not sure if it's possible to convert code in arch/x86/boot/compressed/head_64.S to C. Assembly code there is in 32-bit mode, but if we move it to C it will compiled as 64-bit. I've tried to put it in separate translation unit and compile with -m32, but then link phase breaks as object files have different types. Any suggestion how I can get out of the situation? -- Kirill A. Shutemov
[toc] | [next] | [standalone]
| From | "Kirill A. Shutemov" <kirill@shutemov.name> |
|---|---|
| Date | 2017-04-05 17:40 +0200 |
| Message-ID | <tsVcm-4qr-21@gated-at.bofh.it> |
| In reply to | #1616873 |
On Wed, Apr 05, 2017 at 02:36:24PM +0300, Kirill A. Shutemov wrote: > On Mon, Mar 13, 2017 at 08:18:10AM +0100, Ingo Molnar wrote: > > > > * Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote: > > > > > This patch adds support for 5-level paging during early boot. > > > It generalizes boot for 4- and 5-level paging on 64-bit systems with > > > compile-time switch between them. > > > > > > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> > > > --- > > > arch/x86/boot/compressed/head_64.S | 23 +++++++++-- > > > arch/x86/include/asm/pgtable.h | 2 +- > > > arch/x86/include/asm/pgtable_64.h | 6 ++- > > > arch/x86/include/uapi/asm/processor-flags.h | 2 + > > > arch/x86/kernel/espfix_64.c | 2 +- > > > arch/x86/kernel/head64.c | 40 +++++++++++++----- > > > arch/x86/kernel/head_64.S | 63 +++++++++++++++++++++-------- > > > > Ok, here I'd like to have a C version instead of further complicating an already > > complex assembly version... > > Just head up: I work on this. > > It's great deal of frustration (I can't really read assembly), but I'm > slowly moving forward. > > Most of logic in startup_64 in arch/x86/kernel/head_64.S is converted > to C. Dealing with secondary_startup_64 now. I'm stuck with secondary_startup_64 too. Stack breaks as soon as we switch to new page tables when onlining secondary CPUs. I don't know how to get around this. Would it be sufficient if I only convert startup_64 in arch/x86/kernel/head_64.S to C? -- Kirill A. Shutemov
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web