linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
  • * Re: [PATCHv3 0/4] x86: Make 5-level paging support unconditional for x86-64
           [not found] <20250516123306.3812286-1-kirill.shutemov@linux.intel.com>
           [not found] ` <20250516123306.3812286-5-kirill.shutemov@linux.intel.com>
    @ 2025-05-16 13:11 ` Ingo Molnar
      2025-05-16 13:17   ` Kirill A. Shutemov
           [not found] ` <20250516123306.3812286-3-kirill.shutemov@linux.intel.com>
                       ` (2 subsequent siblings)
      4 siblings, 1 reply; 16+ messages in thread
    From: Ingo Molnar @ 2025-05-16 13:11 UTC (permalink / raw)
      To: Kirill A. Shutemov
      Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
    	H. Peter Anvin, Jonathan Corbet, Andy Lutomirski, Peter Zijlstra,
    	Ard Biesheuvel, Jan Kiszka, Kieran Bingham, Michael Roth,
    	Rick Edgecombe, Brijesh Singh, Sandipan Das, Juergen Gross,
    	Tom Lendacky, linux-kernel, linux-doc, linux-efi, linux-mm,
    	Linus Torvalds
    
    
    * Kirill A. Shutemov <kirill.shutemov@linux.intel.com> wrote:
    
    > Both Intel and AMD CPUs support 5-level paging, which is expected to
    > become more widely adopted in the future.
    > 
    > Remove CONFIG_X86_5LEVEL.
    > 
    > In preparation to that remove CONFIG_DYNAMIC_MEMORY_LAYOUT and make
    > SPARSEMEM_VMEMMAP the only memory model.
    > 
    > v3:
    >  - Drop few "#if CONFIG_PGTABLE_LEVELS >= 5";
    >  - Make PARAVIRT_XXL 64-bit explicitly and drop ifdefs
    >    to support PGTABLE_LEVELS < 5;
    >  - Add Reviewed-by tags from Ard;
    > v2:
    >  - Fix 32-bit build by wrapping p4d_set_huge() and p4d_clear_huge() in
    >    #if CONFIG_PGTABLE_LEVELS > 4;
    >  - Rebased onto current tip/master;
    
    Wow, -v1 was sent almost a year ago. :-)
    
    > Kirill A. Shutemov (4):
    >   x86/64/mm: Always use dynamic memory layout
    >   x86/64/mm: Make SPARSEMEM_VMEMMAP the only memory model
    >   x86/64/mm: Make 5-level paging support unconditional
    >   x86/paravirt: Restrict PARAVIRT_XXL to 64-bit only
    
    >  24 files changed, 14 insertions(+), 142 deletions(-)
    
    Okay, this series makes a lot of sense, because in practice all major 
    distros have 5-level paging enabled:
    
      .config.opensuse.default:     CONFIG_X86_5LEVEL=y
      .config.ubuntu.localinstall:  CONFIG_X86_5LEVEL=y
      .config.fedora.generic:       CONFIG_X86_5LEVEL=y
      .config.rhel.generic:         CONFIG_X86_5LEVEL=y
    
    So the !CONFIG_X86_5LEVEL case gets very little runtime testing by 
    distributions and users.
    
    So I've applied the first two patches to tip:x86/core:
    
      x86/mm/64: Always use dynamic memory layout
      x86/mm/64: Make SPARSEMEM_VMEMMAP the only memory model
    
    as they are fairly straightforward.
    
    Patch #3:
    
      x86/64/mm: Make 5-level paging support unconditional
    
    ... might have to wait until after v6.16-rc1, as it's a higher risk 
    patch.
    
      x86/paravirt: Restrict PARAVIRT_XXL to 64-bit only
    
    ... and this one depends on patch #3.
    
    Does this approach sound good to everyone?
    
    Thanks,
    
    	Ingo
    
    
    ^ permalink raw reply	[flat|nested] 16+ messages in thread
  • [parent not found: <20250516123306.3812286-3-kirill.shutemov@linux.intel.com>]
  • * Re: [PATCHv3 0/4] x86: Make 5-level paging support unconditional for x86-64
           [not found] <20250516123306.3812286-1-kirill.shutemov@linux.intel.com>
                       ` (2 preceding siblings ...)
           [not found] ` <20250516123306.3812286-3-kirill.shutemov@linux.intel.com>
    @ 2025-05-17  9:59 ` Borislav Petkov
      2025-06-24  8:23 ` [PATCHv2 0/3] " Khalid Ali
      4 siblings, 0 replies; 16+ messages in thread
    From: Borislav Petkov @ 2025-05-17  9:59 UTC (permalink / raw)
      To: Kirill A. Shutemov
      Cc: Thomas Gleixner, Ingo Molnar, Dave Hansen, x86, H. Peter Anvin,
    	Jonathan Corbet, Andy Lutomirski, Peter Zijlstra, Ard Biesheuvel,
    	Jan Kiszka, Kieran Bingham, Michael Roth, Rick Edgecombe,
    	Brijesh Singh, Sandipan Das, Juergen Gross, Tom Lendacky,
    	linux-kernel, linux-doc, linux-efi, linux-mm
    
    On Fri, May 16, 2025 at 03:33:02PM +0300, Kirill A. Shutemov wrote:
    > Both Intel and AMD CPUs support 5-level paging, which is expected to
    > become more widely adopted in the future.
    > 
    > Remove CONFIG_X86_5LEVEL.
    > 
    > In preparation to that remove CONFIG_DYNAMIC_MEMORY_LAYOUT and make
    > SPARSEMEM_VMEMMAP the only memory model.
    > 
    > v3:
    >  - Drop few "#if CONFIG_PGTABLE_LEVELS >= 5";
    >  - Make PARAVIRT_XXL 64-bit explicitly and drop ifdefs
    >    to support PGTABLE_LEVELS < 5;
    >  - Add Reviewed-by tags from Ard;
    > v2:
    >  - Fix 32-bit build by wrapping p4d_set_huge() and p4d_clear_huge() in
    >    #if CONFIG_PGTABLE_LEVELS > 4;
    >  - Rebased onto current tip/master;
    > 
    > Kirill A. Shutemov (4):
    >   x86/64/mm: Always use dynamic memory layout
    >   x86/64/mm: Make SPARSEMEM_VMEMMAP the only memory model
    >   x86/64/mm: Make 5-level paging support unconditional
    >   x86/paravirt: Restrict PARAVIRT_XXL to 64-bit only
    
    The whole set passed randbuilds testing here too, and am running boot tests on
    my pile of stinky hw.
    
    If it passes, we could queue it all.
    
    Thx.
    
    -- 
    Regards/Gruss,
        Boris.
    
    https://people.kernel.org/tglx/notes-about-netiquette
    
    
    ^ permalink raw reply	[flat|nested] 16+ messages in thread
  • * Re: [PATCHv2 0/3] x86: Make 5-level paging support unconditional for x86-64
           [not found] <20250516123306.3812286-1-kirill.shutemov@linux.intel.com>
                       ` (3 preceding siblings ...)
      2025-05-17  9:59 ` [PATCHv3 0/4] x86: Make 5-level paging support unconditional for x86-64 Borislav Petkov
    @ 2025-06-24  8:23 ` Khalid Ali
      4 siblings, 0 replies; 16+ messages in thread
    From: Khalid Ali @ 2025-06-24  8:23 UTC (permalink / raw)
      To: tglx, mingo, bp, dave.hansen, hpa, corbet
      Cc: luto, peterz, ardb, jan.kiszka, kbingham, kirill.shutemov,
    	michael.roth, rick.p.edgecombe, brijesh.singh, sandipan.das,
    	jgross, thomas.lendacky, linux-kernel, linux-doc, linux-efi,
    	linux-mm
    
    >Both Intel and AMD CPUs support 5-level paging, which is expected to
    >become more widely adopted in the future.
    >
    >Remove CONFIG_X86_5LEVEL.
    >
    >In preparation to that remove CONFIG_DYNAMIC_MEMORY_LAYOUT and make
    >SPARSEMEM_VMEMMAP the only memory model.
    >
    >v3:
    > - Drop few "#if CONFIG_PGTABLE_LEVELS >= 5";
    > - Make PARAVIRT_XXL 64-bit explicitly and drop ifdefs
    >   to support PGTABLE_LEVELS < 5;
    > - Add Reviewed-by tags from Ard;
    >v2:
    > - Fix 32-bit build by wrapping p4d_set_huge() and p4d_clear_huge() in
    >   #if CONFIG_PGTABLE_LEVELS > 4;
    > - Rebased onto current tip/master;
    >
    >Kirill A. Shutemov (4):
    >  x86/64/mm: Always use dynamic memory layout
    >  x86/64/mm: Make SPARSEMEM_VMEMMAP the only memory model
    >  x86/64/mm: Make 5-level paging support unconditional
    >  x86/paravirt: Restrict PARAVIRT_XXL to 64-bit only
    >
    > Documentation/arch/x86/cpuinfo.rst            |  8 ++---
    > .../arch/x86/x86_64/5level-paging.rst         |  9 -----
    > arch/x86/Kconfig                              | 33 ++-----------------
    > arch/x86/Kconfig.cpufeatures                  |  4 ---
    > arch/x86/boot/compressed/pgtable_64.c         | 11 ++-----
    > arch/x86/boot/header.S                        |  4 ---
    > arch/x86/boot/startup/map_kernel.c            |  5 +--
    > arch/x86/entry/vsyscall/vsyscall_64.c         |  2 --
    > arch/x86/include/asm/page_64.h                |  2 --
    > arch/x86/include/asm/page_64_types.h          | 11 -------
    > arch/x86/include/asm/paravirt.h               |  4 ---
    > arch/x86/include/asm/paravirt_types.h         |  2 --
    > arch/x86/include/asm/pgtable_64.h             |  2 --
    > arch/x86/include/asm/pgtable_64_types.h       | 24 --------------
    > arch/x86/kernel/alternative.c                 |  2 +-
    > arch/x86/kernel/head64.c                      |  4 ---
    > arch/x86/kernel/head_64.S                     |  2 --
    > arch/x86/kernel/paravirt.c                    |  2 --
    > arch/x86/mm/init.c                            |  4 ---
    > arch/x86/mm/init_64.c                         |  9 +----
    > arch/x86/mm/pgtable.c                         |  2 +-
    > arch/x86/xen/mmu_pv.c                         |  4 ---
    > drivers/firmware/efi/libstub/x86-5lvl.c       |  2 +-
    > scripts/gdb/linux/pgtable.py                  |  4 +--
    > 24 files changed, 14 insertions(+), 142 deletions(-)
    
    I think i am too late, however this is completely wrong. There are still processors that doesn't support
    5-level paging which is mordern. We may call those processors old, however they are still common and used.
    
    So this patch seem too early for that. Some intel core-i5 and core-i7 doesn't support 5-level paging at all.
    
    This will break x86_64 cpus that doesn't support 5-level paging.
    
    
    ^ permalink raw reply	[flat|nested] 16+ messages in thread

  • end of thread, other threads:[~2025-06-24  8:23 UTC | newest]
    
    Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <20250516123306.3812286-1-kirill.shutemov@linux.intel.com>
         [not found] ` <20250516123306.3812286-5-kirill.shutemov@linux.intel.com>
    2025-05-16 12:43   ` [PATCHv3 4/4] x86/paravirt: Restrict PARAVIRT_XXL to 64-bit only Jürgen Groß
    2025-05-16 13:11 ` [PATCHv3 0/4] x86: Make 5-level paging support unconditional for x86-64 Ingo Molnar
    2025-05-16 13:17   ` Kirill A. Shutemov
         [not found] ` <20250516123306.3812286-3-kirill.shutemov@linux.intel.com>
    2025-05-16 13:42   ` [PATCHv3 2/4] x86/64/mm: Make SPARSEMEM_VMEMMAP the only memory model Dave Hansen
    2025-05-16 13:45     ` Ingo Molnar
    2025-05-16 14:59       ` Dave Hansen
    2025-05-16 15:08         ` Dave Hansen
    2025-05-16 14:01     ` Kirill A. Shutemov
    2025-05-16 14:08       ` Ingo Molnar
    2025-05-16 15:03         ` Dave Hansen
    2025-05-16 15:35           ` Ingo Molnar
    2025-05-16 15:46             ` Dave Hansen
    2025-05-16 18:28               ` H. Peter Anvin
    2025-05-16 15:01       ` Dave Hansen
    2025-05-17  9:59 ` [PATCHv3 0/4] x86: Make 5-level paging support unconditional for x86-64 Borislav Petkov
    2025-06-24  8:23 ` [PATCHv2 0/3] " Khalid Ali
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for NNTP newsgroup(s).