arm/arm64: add support for folded p4d page tables
Subsystems (6)
v2 cover arm/arm64: add support for folded p4d page tables
From: Mike Rapoport <[email protected]>
Hi,
This is a part of clean up of the page table manipulation code that aims to remove asm-generic/5level-fixup.h and asm-generic/pgtable-nop4d-hack.h
There is a single patch for both arm and arm64 because doing the conversion separately would mean breaking the shared mmu bits in virt/kvm/arm.
v2:
* fix build error for arch/arm64/mm/dump.c
* simplify p4d unfolding in arch/arm64/mm/kasan_init.c
Mike Rapoport (1):
arm/arm64: add support for folded p4d page tables
arch/arm/include/asm/kvm_mmu.h | 5 +- arch/arm/include/asm/pgtable.h | 1 - arch/arm/include/asm/stage2_pgtable.h | 15 +- arch/arm/lib/uaccess_with_memcpy.c | 9 +- arch/arm/mach-sa1100/assabet.c | 2 +- arch/arm/mm/dump.c | 29 +++- arch/arm/mm/fault-armv.c | 7 +- arch/arm/mm/fault.c | 28 +++- arch/arm/mm/idmap.c | 3 +- arch/arm/mm/init.c | 2 +- arch/arm/mm/ioremap.c | 12 +- arch/arm/mm/mm.h | 2 +- arch/arm/mm/mmu.c | 35 +++- arch/arm/mm/pgd.c | 40 ++++- arch/arm64/include/asm/kvm_mmu.h | 10 +- arch/arm64/include/asm/pgalloc.h | 10 +- arch/arm64/include/asm/pgtable-types.h | 5 +- arch/arm64/include/asm/pgtable.h | 37 +++-- arch/arm64/include/asm/stage2_pgtable.h | 48 ++++-- arch/arm64/kernel/hibernate.c | 46 +++++- arch/arm64/mm/dump.c | 29 +++- arch/arm64/mm/fault.c | 9 +- arch/arm64/mm/hugetlbpage.c | 15 +- arch/arm64/mm/kasan_init.c | 26 ++- arch/arm64/mm/mmu.c | 52 ++++-- arch/arm64/mm/pageattr.c | 7 +- virt/kvm/arm/mmu.c | 209 ++++++++++++++++++++---- 27 files changed, 550 insertions(+), 143 deletions(-)
Signature · 1 line
2.24.0
PATCH v2 1/1 arm/arm64: add support for folded p4d page tables
From: Mike Rapoport <[email protected]>
Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5level-fixup.h with pgtable-nop4d.h and remove __ARCH_USE_5LEVEL_HACK.
Since arm and arm64 share kvm memory management bits, make the conversion for both variants at once to avoid breaking the builds in the middle.
--- arch/arm/include/asm/kvm_mmu.h | 5 +- arch/arm/include/asm/pgtable.h | 1 - arch/arm/include/asm/stage2_pgtable.h | 15 +- arch/arm/lib/uaccess_with_memcpy.c | 9 +- arch/arm/mach-sa1100/assabet.c | 2 +- arch/arm/mm/dump.c | 29 +++- arch/arm/mm/fault-armv.c | 7 +- arch/arm/mm/fault.c | 28 +++- arch/arm/mm/idmap.c | 3 +- arch/arm/mm/init.c | 2 +- arch/arm/mm/ioremap.c | 12 +- arch/arm/mm/mm.h | 2 +- arch/arm/mm/mmu.c | 35 +++- arch/arm/mm/pgd.c | 40 ++++- arch/arm64/include/asm/kvm_mmu.h | 10 +- arch/arm64/include/asm/pgalloc.h | 10 +- arch/arm64/include/asm/pgtable-types.h | 5 +- arch/arm64/include/asm/pgtable.h | 37 +++-- arch/arm64/include/asm/stage2_pgtable.h | 48 ++++-- arch/arm64/kernel/hibernate.c | 46 +++++- arch/arm64/mm/dump.c | 29 +++- arch/arm64/mm/fault.c | 9 +- arch/arm64/mm/hugetlbpage.c | 15 +- arch/arm64/mm/kasan_init.c | 26 ++- arch/arm64/mm/mmu.c | 52 ++++-- arch/arm64/mm/pageattr.c | 7 +- virt/kvm/arm/mmu.c | 209 ++++++++++++++++++++---- 27 files changed, 550 insertions(+), 143 deletions(-)
arch/arm/include/asm/kvm_mmu.h +4 -1
@@ -68,7 +68,8 @@ void kvm_clear_hyp_idmap(void);#define kvm_mk_pmd (ptep) __pmd(__pa(ptep) | PMD_TYPE_TABLE)#define kvm_mk_pud (pmdp) __pud(__pa(pmdp) | PMD_TYPE_TABLE) -#define kvm_mk_pgd (pudp) ({ BUILD_BUG(); 0; }) +#define kvm_mk_p4d (pudp) ({ BUILD_BUG(); __p4d(0); }) +#define kvm_mk_pgd (p4dp) ({ BUILD_BUG(); 0; })#define kvm_pfn_pte (pfn, prot) pfn_pte(pfn, prot)#define kvm_pfn_pmd (pfn, prot) pfn_pmd(pfn, prot)
@@ -194,10 +195,12 @@ static inline bool kvm_page_empty(void *ptr)#define kvm_pte_table_empty (kvm, ptep) kvm_page_empty(ptep)#define kvm_pmd_table_empty (kvm, pmdp) kvm_page_empty(pmdp)#define kvm_pud_table_empty (kvm, pudp) false +#define kvm_p4d_table_empty (kvm, p4dp) false#define hyp_pte_table_empty (ptep) kvm_page_empty(ptep)#define hyp_pmd_table_empty (pmdp) kvm_page_empty(pmdp)#define hyp_pud_table_empty (pudp) false +#define hyp_p4d_table_empty (p4dp) falsestruct kvm ;
arch/arm/include/asm/pgtable.h +0 -1
@@ -17,7 +17,6 @@#else -#define __ARCH_USE_5LEVEL_HACK#include <asm-generic/pgtable-nopud.h> #include <asm/memory.h> #include <asm/pgtable-hwdef.h>
arch/arm/include/asm/stage2_pgtable.h +13 -2
@@ -19,8 +19,17 @@#define stage2_pgd_none (kvm, pgd) pgd_none(pgd)#define stage2_pgd_clear (kvm, pgd) pgd_clear(pgd)#define stage2_pgd_present (kvm, pgd) pgd_present(pgd) -#define stage2_pgd_populate (kvm, pgd, pud) pgd_populate(NULL, pgd, pud) -#define stage2_pud_offset (kvm, pgd, address) pud_offset(pgd, address) +#define stage2_pgd_populate (kvm, pgd, p4d) pgd_populate(NULL, pgd, p4d) + +#define stage2_p4d_offset (kvm, pgd, address) p4d_offset(pgd, address) +#define stage2_p4d_free (kvm, p4d) do { } while (0) + +#define stage2_p4d_none (kvm, p4d) p4d_none(p4d) +#define stage2_p4d_clear (kvm, p4d) p4d_clear(p4d) +#define stage2_p4d_present (kvm, p4d) p4d_present(p4d) +#define stage2_p4d_populate (kvm, p4d, pud) p4d_populate(NULL, p4d, pud) + +#define stage2_pud_offset (kvm, p4d, address) pud_offset(p4d, address)#define stage2_pud_free (kvm, pud) do { } while (0)#define stage2_pud_none (kvm, pud) pud_none(pud)
@@ -41,6 +50,7 @@ stage2_pgd_addr_end(struct kvm *kvm, phys_addr_t addr, phys_addr_t end)return (boundary -1 < end -1 ) ? boundary : end; } +#define stage2_p4d_addr_end (kvm, addr, end) (end)#define stage2_pud_addr_end (kvm, addr, end) (end) static inline phys_addr_t
@@ -56,6 +66,7 @@ stage2_pmd_addr_end(struct kvm *kvm, phys_addr_t addr, phys_addr_t end)#define stage2_pte_table_empty (kvm, ptep) kvm_page_empty(ptep)#define stage2_pmd_table_empty (kvm, pmdp) kvm_page_empty(pmdp)#define stage2_pud_table_empty (kvm, pudp) false +#define stage2_p4d_table_empty (kvm, p4dp) falsestatic inline bool kvm_stage2_has_pud (struct kvm *kvm) {
arch/arm/lib/uaccess_with_memcpy.c +7 -2
@@ -24,6 +24,7 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp) {unsigned long addr = (unsigned long )_addr;pgd_t *pgd; +p4d_t *p4d;pmd_t *pmd;pte_t *pte;pud_t *pud;
@@ -33,7 +34,11 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp)if (unlikely (pgd_none (*pgd) ||pgd_bad (*pgd)))return 0 ; - pud =pud_offset (pgd, addr); + p4d =p4d_offset (pgd, addr); +if (unlikely (p4d_none (*p4d) ||p4d_bad (*p4d))) +return 0 ; + + pud =pud_offset (p4d, addr);if (unlikely (pud_none (*pud) ||pud_bad (*pud)))return 0 ;
@@ -154,7 +159,7 @@ arm_copy_to_user(void __user *to, const void *from, unsigned long n) }return n; } - +static unsigned long noinline __clear_user_memset (void __user *addr,unsigned long n) {
arch/arm/mach-sa1100/assabet.c +1 -1
@@ -633,7 +633,7 @@ static void __init map_sa1100_gpio_regs( void )int prot =PMD_TYPE_SECT |PMD_SECT_AP_WRITE |PMD_DOMAIN (DOMAIN_IO );pmd_t *pmd; - pmd =pmd_offset (pud_offset (pgd_offset_k (virt), virt), virt); + pmd =pmd_offset (pud_offset (p4d_offset (pgd_offset_k (virt), virt), virt), virt); *pmd =__pmd (phys | prot);flush_pmd_entry (pmd); }
arch/arm/mm/dump.c +23 -6
@@ -207,6 +207,7 @@ struct pg_level {static struct pg_level pg_level[] = { { }, {/* pgd */ + }, {/* p4d */ }, {/* pud */ }, {/* pmd */ .bits = section_bits,
@@ -308,7 +309,7 @@ static void walk_pte(struct pg_state *st, pmd_t *pmd, unsigned long start,for (i =0 ; i <PTRS_PER_PTE ; i++, pte++) { addr = start + i *PAGE_SIZE ; -note_page (st, addr,4 ,pte_val (*pte), domain); +note_page (st, addr,5 ,pte_val (*pte), domain); } }
@@ -350,14 +351,14 @@ static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start) addr +=SECTION_SIZE ; pmd++; domain =get_domain_name (pmd); -note_page (st, addr,3 ,pmd_val (*pmd), domain); +note_page (st, addr,4 ,pmd_val (*pmd), domain); } } } -static void walk_pud (struct pg_state *st,pgd_t *pgd,unsigned long start) +static void walk_pud (struct pg_state *st,p4d_t *p4d,unsigned long start) { -pud_t *pud =pud_offset (pgd,0 ); +pud_t *pud =pud_offset (p4d,0 );unsigned long addr;unsigned i;
@@ -366,7 +367,23 @@ static void walk_pud(struct pg_state *st, pgd_t *pgd, unsigned long start)if (!pud_none (*pud)) {walk_pmd (st, pud, addr); }else { -note_page (st, addr,2 ,pud_val (*pud),NULL ); +note_page (st, addr,3 ,pud_val (*pud),NULL ); + } + } +} + +static void walk_p4d (struct pg_state *st,pgd_t *pgd,unsigned long start) +{ +p4d_t *p4d =p4d_offset (pgd,0 ); +unsigned long addr; +unsigned i; + +for (i =0 ; i <PTRS_PER_P4D ; i++, p4d++) { + addr = start + i *P4D_SIZE ; +if (!p4d_none (*p4d)) { +walk_pud (st, p4d, addr); + }else { +note_page (st, addr,2 ,p4d_val (*p4d),NULL ); } } }
@@ -381,7 +398,7 @@ static void walk_pgd(struct pg_state *st, struct mm_struct *mm,for (i =0 ; i <PTRS_PER_PGD ; i++, pgd++) { addr = start + i *PGDIR_SIZE ;if (!pgd_none (*pgd)) { -walk_pud (st, pgd, addr); +walk_p4d (st, pgd, addr); }else {note_page (st, addr,1 ,pgd_val (*pgd),NULL ); }
arch/arm/mm/fault-armv.c +6 -1
@@ -91,6 +91,7 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address, {spinlock_t *ptl;pgd_t *pgd; +p4d_t *p4d;pud_t *pud;pmd_t *pmd;pte_t *pte;
@@ -100,7 +101,11 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address,if (pgd_none_or_clear_bad (pgd))return 0 ; - pud =pud_offset (pgd, address); + p4d =p4d_offset (pgd, address); +if (p4d_none_or_clear_bad (p4d)) +return 0 ; + + pud =pud_offset (p4d, address);if (pud_none_or_clear_bad (pud))return 0 ;
arch/arm/mm/fault.c +25 -3
@@ -43,6 +43,7 @@ void show_pte(const char *lvl, struct mm_struct *mm, unsigned long addr)printk ("%s[%08lx] *pgd=%08llx" , lvl, addr, (long long )pgd_val (*pgd)); do { + p4d_t *p4d; pud_t *pud; pmd_t *pmd; pte_t *pte;
@@ -55,7 +56,19 @@ void show_pte(const char *lvl, struct mm_struct *mm, unsigned long addr)break ; } - pud =pud_offset (pgd, addr); + p4d =p4d_offset (pgd, addr); +if (PTRS_PER_P4D !=1 ) +pr_cont (", *p4d=%08llx" , (long long )p4d_val (*p4d)); + +if (p4d_none (*p4d)) +break ; + +if (p4d_bad (*p4d)) { +pr_cont ("(bad)" ); +break ; + } + + pud =pud_offset (p4d, addr);if (PTRS_PER_PUD !=1 )pr_cont (", *pud=%08llx" , (long long )pud_val (*pud));
@@ -408,6 +421,7 @@ do_translation_fault(unsigned long addr, unsigned int fsr, {unsigned int index;pgd_t *pgd, *pgd_k; +p4d_t *p4d, *p4d_k;pud_t *pud, *pud_k;pmd_t *pmd, *pmd_k;
@@ -427,8 +441,16 @@ do_translation_fault(unsigned long addr, unsigned int fsr,if (!pgd_present (*pgd))set_pgd (pgd, *pgd_k); - pud =pud_offset (pgd, addr); - pud_k =pud_offset (pgd_k, addr); + p4d =p4d_offset (pgd, addr); + p4d_k =p4d_offset (pgd_k, addr); + +if (p4d_none (*p4d_k)) + goto bad_area; +if (!p4d_present (*p4d)) +set_p4d (p4d, *p4d_k); + + pud =pud_offset (p4d, addr); + pud_k =pud_offset (p4d_k, addr);if (pud_none (*pud_k)) goto bad_area;
arch/arm/mm/idmap.c +2 -1
@@ -68,7 +68,8 @@ static void idmap_add_pmd(pud_t *pud, unsigned long addr, unsigned long end,static void idmap_add_pud (pgd_t *pgd,unsigned long addr,unsigned long end,unsigned long prot) { -pud_t *pud =pud_offset (pgd, addr); +p4d_t *p4d =p4d_offset (pgd, addr); +pud_t *pud =pud_offset (p4d, addr);unsigned long next; do {
arch/arm/mm/init.c +1 -1
@@ -571,7 +571,7 @@ static inline void section_update(unsigned long addr, pmdval_t mask, {pmd_t *pmd; - pmd =pmd_offset (pud_offset (pgd_offset (mm, addr), addr), addr); + pmd =pmd_off_k (addr);#ifdef CONFIG_ARM_LPAE pmd[0 ] =__pmd ((pmd_val (pmd[0 ]) & mask) | prot);
arch/arm/mm/ioremap.c +9 -3
@@ -142,12 +142,14 @@ static void unmap_area_sections(unsigned long virt, unsigned long size) {unsigned long addr = virt, end = virt + (size & ~(SZ_1M -1 ));pgd_t *pgd; +p4d_t *p4d;pud_t *pud;pmd_t *pmdp;flush_cache_vunmap (addr, end); pgd =pgd_offset_k (addr); - pud =pud_offset (pgd, addr); + p4d =p4d_offset (pgd, addr); + pud =pud_offset (p4d, addr); pmdp =pmd_offset (pud, addr); do { pmd_t pmd = *pmdp;
@@ -190,6 +192,7 @@ remap_area_sections(unsigned long virt, unsigned long pfn, {unsigned long addr = virt, end = virt + size;pgd_t *pgd; +p4d_t *p4d;pud_t *pud;pmd_t *pmd;
@@ -200,7 +203,8 @@ remap_area_sections(unsigned long virt, unsigned long pfn,unmap_area_sections (virt, size); pgd =pgd_offset_k (addr); - pud =pud_offset (pgd, addr); + p4d =p4d_offset (pgd, addr); + pud =pud_offset (p4d, addr); pmd =pmd_offset (pud, addr); do { pmd[0] = __pmd(__pfn_to_phys(pfn) | type->prot_sect);
@@ -222,6 +226,7 @@ remap_area_supersections(unsigned long virt, unsigned long pfn, {unsigned long addr = virt, end = virt + size;pgd_t *pgd; +p4d_t *p4d;pud_t *pud;pmd_t *pmd;
@@ -232,7 +237,8 @@ remap_area_supersections(unsigned long virt, unsigned long pfn,unmap_area_sections (virt, size); pgd =pgd_offset_k (virt); - pud =pud_offset (pgd, addr); + p4d =p4d_offset (pgd, addr); + pud =pud_offset (p4d, addr); pmd =pmd_offset (pud, addr); do { unsigned long super_pmd_val, i;
arch/arm/mm/mm.h +1 -1
@@ -38,7 +38,7 @@ static inline pte_t get_top_pte(unsigned long va)static inline pmd_t *pmd_off_k (unsigned long virt) { -return pmd_offset (pud_offset (pgd_offset_k (virt), virt), virt); +return pmd_offset (pud_offset (p4d_offset (pgd_offset_k (virt), virt), virt), virt); }struct mem_type {
arch/arm/mm/mmu.c +29 -6
@@ -375,7 +375,8 @@ static pte_t *pte_offset_late_fixmap(pmd_t *dir, unsigned long addr)static inline pmd_t *__init fixmap_pmd (unsigned long addr) {pgd_t *pgd =pgd_offset_k (addr); -pud_t *pud =pud_offset (pgd, addr); +p4d_t *p4d =p4d_offset (pgd, addr); +pud_t *pud =pud_offset (p4d, addr);pmd_t *pmd =pmd_offset (pud, addr);return pmd;
@@ -827,12 +828,12 @@ static void __init alloc_init_pmd(pud_t *pud, unsigned long addr, }while (pmd++, addr = next, addr != end); } -static void __init alloc_init_pud (pgd_t *pgd,unsigned long addr, +static void __init alloc_init_pud (p4d_t *p4d,unsigned long addr,unsigned long end,phys_addr_t phys,const struct mem_type *type,void *(*alloc)(unsigned long sz),bool ng) { -pud_t *pud =pud_offset (pgd, addr); +pud_t *pud =pud_offset (p4d, addr);unsigned long next; do {
@@ -842,6 +843,21 @@ static void __init alloc_init_pud(pgd_t *pgd, unsigned long addr, }while (pud++, addr = next, addr != end); } +static void __init alloc_init_p4d (pgd_t *pgd,unsigned long addr, +unsigned long end,phys_addr_t phys, +const struct mem_type *type, +void *(*alloc)(unsigned long sz),bool ng) +{ +p4d_t *p4d =p4d_offset (pgd, addr); +unsigned long next; + +do { + next =p4d_addr_end (addr, end); +alloc_init_pud (p4d, addr, next, phys, type, alloc, ng); + phys += next - addr; + }while (p4d++, addr = next, addr != end); +} +#ifndef CONFIG_ARM_LPAE static void __init create_36bit_mapping(struct mm_struct *mm, struct map_desc *md,
@@ -889,7 +905,8 @@ static void __init create_36bit_mapping(struct mm_struct *mm, pgd =pgd_offset (mm, addr); end = addr + length; do { - pud_t *pud = pud_offset(pgd, addr); + p4d_t *p4d = p4d_offset(pgd, addr); + pud_t *pud = pud_offset(p4d, addr); pmd_t *pmd = pmd_offset(pud, addr); int i;
@@ -940,7 +957,7 @@ static void __init __create_mapping(struct mm_struct *mm, struct map_desc *md, do { unsigned long next = pgd_addr_end(addr, end); - alloc_init_pud(pgd, addr, next, phys, type, alloc, ng); + alloc_init_p4d(pgd, addr, next, phys, type, alloc, ng); phys += next - addr; addr = next;
@@ -976,7 +993,13 @@ void __init create_mapping_late(struct mm_struct *mm, struct map_desc *md, bool ng) {#ifdef CONFIG_ARM_LPAE -pud_t *pud =pud_alloc (mm,pgd_offset (mm, md->virtual), md->virtual); +p4d_t *p4d; +pud_t *pud; + + p4d =p4d_alloc (mm,pgd_offset (mm, md->virtual), md->virtual); +if (!WARN_ON (!p4d)) +return ; + pud =pud_alloc (mm, p4d, md->virtual);if (WARN_ON (!pud))return ;pmd_alloc (mm, pud,0 );
arch/arm/mm/pgd.c +33 -7
@@ -30,6 +30,7 @@pgd_t *pgd_alloc (struct mm_struct *mm) {pgd_t *new_pgd, *init_pgd; +p4d_t *new_p4d, *init_p4d;pud_t *new_pud, *init_pud;pmd_t *new_pmd, *init_pmd;pte_t *new_pte, *init_pte;
@@ -53,8 +54,12 @@ pgd_t *pgd_alloc(struct mm_struct *mm)/* * Allocate PMD table for modules and pkmap mappings. */ - new_pud =pud_alloc (mm, new_pgd +pgd_index (MODULES_VADDR ), + new_p4d =p4d_alloc (mm, new_pgd +pgd_index (MODULES_VADDR ),MODULES_VADDR ); +if (!new_p4d) + goto no_p4d; + + new_pud =pud_alloc (mm, new_p4d,MODULES_VADDR );if (!new_pud) goto no_pud;
@@ -69,7 +74,11 @@ pgd_t *pgd_alloc(struct mm_struct *mm)* contains the machine vectors. The vectors are always high * with LPAE. */ - new_pud =pud_alloc (mm, new_pgd,0 ); + new_p4d =p4d_alloc (mm, new_pgd,0 ); +if (!new_p4d) + goto no_p4d; + + new_pud =pud_alloc (mm, new_p4d,0 );if (!new_pud) goto no_pud;
@@ -91,7 +100,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm)pmd_val (*new_pmd) |=PMD_DOMAIN (DOMAIN_VECTORS );#endif - init_pud =pud_offset (init_pgd,0 ); + init_p4d =p4d_offset (init_pgd,0 ); + init_pud =pud_offset (init_p4d,0 ); init_pmd =pmd_offset (init_pud,0 ); init_pte =pte_offset_map (init_pmd,0 );set_pte_ext (new_pte +0 , init_pte[0 ],0 );
@@ -108,6 +118,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm) no_pmd:pud_free (mm, new_pud); no_pud: +p4d_free (mm, new_p4d); +no_p4d:__pgd_free (new_pgd); no_pgd:return NULL ;
@@ -116,6 +128,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)void pgd_free (struct mm_struct *mm,pgd_t *pgd_base) {pgd_t *pgd; +p4d_t *p4d;pud_t *pud;pmd_t *pmd;pgtable_t pte;
@@ -127,7 +140,11 @@ void pgd_free(struct mm_struct *mm, pgd_t *pgd_base)if (pgd_none_or_clear_bad (pgd)) goto no_pgd; - pud =pud_offset (pgd,0 ); + p4d =p4d_offset (pgd,0 ); +if (p4d_none_or_clear_bad (p4d)) + goto no_p4d; + + pud =pud_offset (p4d,0 );if (pud_none_or_clear_bad (pud)) goto no_pud;
@@ -144,8 +161,11 @@ void pgd_free(struct mm_struct *mm, pgd_t *pgd_base)pmd_free (mm, pmd);mm_dec_nr_pmds (mm); no_pud: -pgd_clear (pgd); +p4d_clear (p4d);pud_free (mm, pud); +no_p4d: +pgd_clear (pgd); +p4d_free (mm, p4d); no_pgd: #ifdef CONFIG_ARM_LPAE/*
@@ -156,15 +176,21 @@ void pgd_free(struct mm_struct *mm, pgd_t *pgd_base)continue ;if (pgd_val (*pgd) &L_PGD_SWAPPER )continue ; - pud =pud_offset (pgd,0 ); + p4d =p4d_offset (pgd,0 ); +if (p4d_none_or_clear_bad (p4d)) +continue ; + pud =pud_offset (p4d,0 );if (pud_none_or_clear_bad (pud))continue ; pmd =pmd_offset (pud,0 );pud_clear (pud);pmd_free (mm, pmd);mm_dec_nr_pmds (mm); -pgd_clear (pgd); +p4d_clear (p4d);pud_free (mm, pud); +mm_dec_nr_puds (mm); +pgd_clear (pgd); + p4d_free(mm, p4d); }#endif __pgd_free (pgd_base);
arch/arm64/include/asm/kvm_mmu.h +8 -2
@@ -172,8 +172,8 @@ void kvm_clear_hyp_idmap(void); __pmd(__phys_to_pmd_val(__pa(ptep)) | PMD_TYPE_TABLE)#define kvm_mk_pud (pmdp) \ __pud(__phys_to_pud_val(__pa(pmdp)) | PMD_TYPE_TABLE) -#define kvm_mk_pgd (pudp) \ - __pgd(__phys_to_pgd_val(__pa(pudp)) | PUD_TYPE_TABLE) +#define kvm_mk_p4d (pmdp) \ + __p4d(__phys_to_p4d_val(__pa(pmdp)) | PUD_TYPE_TABLE)#define kvm_set_pud (pudp, pud) set_pud(pudp, pud)
@@ -299,6 +299,12 @@ static inline bool kvm_s2pud_young(pud_t pud)#define hyp_pud_table_empty (pudp) kvm_page_empty(pudp)#endif +#ifdef __PAGETABLE_P4D_FOLDED +#define hyp_p4d_table_empty (p4dp) (0) +#else +#define hyp_p4d_table_empty (p4dp) kvm_page_empty(p4dp) +#endif +struct kvm ;#define kvm_flush_dcache_to_poc (a,l) __flush_dcache_area((a), (l))
arch/arm64/include/asm/pgalloc.h +5 -5
@@ -73,17 +73,17 @@ static inline void pud_free(struct mm_struct *mm, pud_t *pudp) free_page((unsigned long)pudp); } -static inline void __pgd_populate (pgd_t *pgdp,phys_addr_t pudp,pgdval_t prot) +static inline void __p4d_populate (p4d_t *p4dp,phys_addr_t pudp,p4dval_t prot) { -set_pgd (pgdp,__pgd (__phys_to_pgd_val (pudp) | prot)); +set_p4d (p4dp,__p4d (__phys_to_p4d_val (pudp) | prot)); } -static inline void pgd_populate (struct mm_struct *mm,pgd_t *pgdp,pud_t *pudp) +static inline void p4d_populate (struct mm_struct *mm,p4d_t *p4dp,pud_t *pudp) { -__pgd_populate (pgdp,__pa (pudp),PUD_TYPE_TABLE ); +__p4d_populate (p4dp,__pa (pudp),PUD_TYPE_TABLE ); }#else -static inline void __pgd_populate (pgd_t *pgdp,phys_addr_t pudp,pgdval_t prot) +static inline void __p4d_populate (p4d_t *p4dp,phys_addr_t pudp,p4dval_t prot) {BUILD_BUG (); }
arch/arm64/include/asm/pgtable-types.h +2 -3
@@ -14,6 +14,7 @@typedef u64 pteval_t ;typedef u64 pmdval_t ;typedef u64 pudval_t ; +typedef u64 p4dval_t ;typedef u64 pgdval_t ;/*
@@ -44,13 +45,11 @@ typedef struct { pteval_t pgprot; } pgprot_t;#define __pgprot (x) ((pgprot_t) { (x) } )#if CONFIG_PGTABLE_LEVELS ==2 -#define __ARCH_USE_5LEVEL_HACK#include <asm-generic/pgtable-nopmd.h> #elif CONFIG_PGTABLE_LEVELS ==3 -#define __ARCH_USE_5LEVEL_HACK#include <asm-generic/pgtable-nopud.h> #elif CONFIG_PGTABLE_LEVELS ==4 -#include <asm-generic/5level-fixup.h> +#include <asm-generic/pgtable-nop4d.h> #endif #endif /* __ASM_PGTABLE_TYPES_H */
arch/arm64/include/asm/pgtable.h +23 -14
@@ -298,6 +298,11 @@ static inline pte_t pgd_pte(pgd_t pgd)return __pte (pgd_val (pgd)); } +static inline pte_t p4d_pte (p4d_t p4d) +{ +return __pte (p4d_val (p4d)); +} +static inline pte_t pud_pte (pud_t pud) {return __pte (pud_val (pud));
@@ -401,6 +406,9 @@ static inline pmd_t pmd_mkdevmap(pmd_t pmd)#define set_pmd_at (mm, addr, pmdp, pmd) set_pte_at(mm, addr, (pte_t *)pmdp, pmd_pte(pmd)) +#define __p4d_to_phys (p4d) __pte_to_phys(p4d_pte(p4d)) +#define __phys_to_p4d_val (phys) __phys_to_pte_val(phys) +#define __pgd_to_phys (pgd) __pte_to_phys(pgd_pte(pgd))#define __phys_to_pgd_val (phys) __phys_to_pte_val(phys)
@@ -586,49 +594,50 @@ static inline phys_addr_t pud_page_paddr(pud_t pud)#define pud_ERROR (pud) __pud_error(__FILE__, __LINE__, pud_val(pud)) -#define pgd_none (pgd) (!pgd_val(pgd)) -#define pgd_bad (pgd) (!(pgd_val(pgd) & 2)) -#define pgd_present (pgd) (pgd_val(pgd)) +#define p4d_none (p4d) (!p4d_val(p4d)) +#define p4d_bad (p4d) (!(p4d_val(p4d) & 2)) +#define p4d_present (p4d) (p4d_val(p4d)) -static inline void set_pgd (pgd_t *pgdp,pgd_t pgd) +static inline void set_p4d (p4d_t *p4dp,p4d_t p4d) { -if (in_swapper_pgdir (pgdp)) { -set_swapper_pgd (pgdp, pgd); +if (in_swapper_pgdir (p4dp)) { +set_swapper_pgd ((pgd_t *)p4dp,__pgd (p4d_val (p4d)));return ; } -WRITE_ONCE (*pgdp, pgd); +WRITE_ONCE (*p4dp, p4d);dsb (ishst);isb (); } -static inline void pgd_clear (pgd_t *pgdp) +static inline void p4d_clear (p4d_t *p4dp) { -set_pgd (pgdp,__pgd (0 )); +set_p4d (p4dp,__p4d (0 )); } -static inline phys_addr_t pgd_page_paddr (pgd_t pgd) +static inline phys_addr_t p4d_page_paddr (p4d_t p4d) { -return __pgd_to_phys (pgd); +return __p4d_to_phys (p4d); }/* Find an entry in the frst-level page table. */ #define pud_index (addr) (((addr) >> PUD_SHIFT) & (PTRS_PER_PUD - 1)) -#define pud_offset_phys (dir, addr) (pgd_page_paddr(READ_ONCE(*(dir))) + pud_index(addr) * sizeof(pud_t)) +#define pud_offset_phys (dir, addr) (p4d_page_paddr(READ_ONCE(*(dir))) + pud_index(addr) * sizeof(pud_t))#define pud_offset (dir, addr) ((pud_t *)__va(pud_offset_phys((dir), (addr))))#define pud_set_fixmap (addr) ((pud_t *)set_fixmap_offset(FIX_PUD, addr)) -#define pud_set_fixmap_offset (pgd, addr) pud_set_fixmap(pud_offset_phys(pgd, addr)) +#define pud_set_fixmap_offset (p4d, addr) pud_set_fixmap(pud_offset_phys(p4d, addr))#define pud_clear_fixmap () clear_fixmap(FIX_PUD) -#define pgd_page (pgd) pfn_to_page(__phys_to_pfn(__pgd_to_phys(pgd))) +#define p4d_page (p4d) pfn_to_page(__phys_to_pfn(__p4d_to_phys(p4d)))/* use ONLY for statically allocated translation tables */ #define pud_offset_kimg (dir,addr) ((pud_t *)__phys_to_kimg(pud_offset_phys((dir), (addr))))#else +#define p4d_page_paddr (p4d) ({ BUILD_BUG(); 0;})#define pgd_page_paddr (pgd) ({ BUILD_BUG(); 0;})/* Match pud_offset folding in <asm/generic/pgtable-nopud.h> */
arch/arm64/include/asm/stage2_pgtable.h +37 -11
78 lines not on this page · raw message
arch/arm64/kernel/hibernate.c +39 -7
87 lines not on this page · raw message
arch/arm64/mm/dump.c +26 -3
@@ -179,6 +179,10 @@ static struct pg_level pg_level[] = { .name = "PGD", .bits = pte_bits, .num = ARRAY_SIZE(pte_bits), + }, { /* p4d */ + .name = "P4D", + .bits = pte_bits, + .num = ARRAY_SIZE(pte_bits), }, { /* pud */ .name = (CONFIG_PGTABLE_LEVELS > 3) ? "PUD" : "PGD", .bits = pte_bits,
@@ -323,11 +327,11 @@ static void walk_pmd(struct pg_state *st, pud_t *pudp, unsigned long start, }while (pmdp++, addr = next, addr != end); } -static void walk_pud (struct pg_state *st,pgd_t *pgdp,unsigned long start, +static void walk_pud (struct pg_state *st,p4d_t *p4dp,unsigned long start,unsigned long end) {unsigned long next, addr = start; -pud_t *pudp =pud_offset (pgdp, start); +pud_t *pudp =pud_offset (p4dp, start); do { pud_t pud = READ_ONCE(*pudp);
@@ -342,6 +346,25 @@ static void walk_pud(struct pg_state *st, pgd_t *pgdp, unsigned long start, }while (pudp++, addr = next, addr != end); } +static void walk_p4d (struct pg_state *st,pgd_t *pgdp,unsigned long start, +unsigned long end) +{ +unsigned long next, addr = start; +p4d_t *p4dp =p4d_offset (pgdp, start); + +do { +p4d_t p4d =READ_ONCE (*p4dp); + next =p4d_addr_end (addr, end); + +if (p4d_none (p4d)) { +note_page (st, addr,2 ,p4d_val (p4d)); + }else { +BUG_ON (p4d_bad (p4d)); +walk_pud (st, p4dp, addr, next); + } + }while (p4dp++, addr = next, addr != end); +} +static void walk_pgd (struct pg_state *st,struct mm_struct *mm,unsigned long start) {
@@ -357,7 +380,7 @@ static void walk_pgd(struct pg_state *st, struct mm_struct *mm,note_page (st, addr,1 ,pgd_val (pgd)); }else {BUG_ON (pgd_bad (pgd)); -walk_pud (st, pgdp, addr, next); +walk_p4d (st, pgdp, addr, next); } }while (pgdp++, addr = next, addr != end); }
arch/arm64/mm/fault.c +8 -1
@@ -145,6 +145,7 @@ static void show_pte(unsigned long addr)pr_alert ("[%016lx] pgd=%016llx" , addr,pgd_val (pgd)); do { + p4d_t *p4dp, p4d; pud_t *pudp, pud; pmd_t *pmdp, pmd; pte_t *ptep, pte;
@@ -152,7 +153,13 @@ static void show_pte(unsigned long addr)if (pgd_none (pgd) ||pgd_bad (pgd))break ; - pudp =pud_offset (pgdp, addr); + p4dp =p4d_offset (pgdp, addr); + p4d =READ_ONCE (*p4dp); +pr_cont (", p4d=%016llx" ,p4d_val (p4d)); +if (p4d_none (p4d) ||p4d_bad (p4d)) +break ; + + pudp =pud_offset (p4dp, addr); pud =READ_ONCE (*pudp);pr_cont (", pud=%016llx" ,pud_val (pud));if (pud_none (pud) ||pud_bad (pud))
arch/arm64/mm/hugetlbpage.c +12 -3
@@ -67,11 +67,13 @@ static int find_num_contig(struct mm_struct *mm, unsigned long addr, pte_t *ptep, size_t *pgsize) {pgd_t *pgdp =pgd_offset (mm, addr); +p4d_t *p4dp;pud_t *pudp;pmd_t *pmdp; *pgsize =PAGE_SIZE ; - pudp =pud_offset (pgdp, addr); + p4dp =p4d_offset (pgdp, addr); + pudp =pud_offset (p4dp, addr); pmdp =pmd_offset (pudp, addr);if ((pte_t *)pmdp == ptep) { *pgsize =PMD_SIZE ;
@@ -217,12 +219,14 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz) {pgd_t *pgdp; +p4d_t *p4dp;pud_t *pudp;pmd_t *pmdp;pte_t *ptep =NULL ; pgdp =pgd_offset (mm, addr); - pudp =pud_alloc (mm, pgdp, addr); + p4dp =p4d_offset (pgdp, addr); + pudp =pud_alloc (mm, p4dp, addr);if (!pudp)return NULL ;
@@ -259,6 +263,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr, unsigned long sz) {pgd_t *pgdp; +p4d_t *p4dp;pud_t *pudp, pud;pmd_t *pmdp, pmd;
@@ -266,7 +271,11 @@ pte_t *huge_pte_offset(struct mm_struct *mm,if (!pgd_present (READ_ONCE (*pgdp)))return NULL ; - pudp =pud_offset (pgdp, addr); + p4dp =p4d_offset (pgdp, addr); +if (!p4d_present (READ_ONCE (*p4dp))) +return NULL ; + + pudp =pud_offset (p4dp, addr); pud =READ_ONCE (*pudp);if (sz !=PUD_SIZE &&pud_none (pud))return NULL ;
arch/arm64/mm/kasan_init.c +19 -7
@@ -84,17 +84,17 @@ static pmd_t *__init kasan_pmd_offset(pud_t *pudp, unsigned long addr, int node,return early ?pmd_offset_kimg (pudp, addr) :pmd_offset (pudp, addr); } -static pud_t *__init kasan_pud_offset (pgd_t *pgdp,unsigned long addr,int node, +static pud_t *__init kasan_pud_offset (p4d_t *p4dp,unsigned long addr,int node,bool early) { -if (pgd_none (READ_ONCE (*pgdp))) { +if (p4d_none (READ_ONCE (*p4dp))) {phys_addr_t pud_phys = early ?__pa_symbol (kasan_early_shadow_pud) :kasan_alloc_zeroed_page (node); -__pgd_populate (pgdp, pud_phys,PMD_TYPE_TABLE ); +__p4d_populate (p4dp, pud_phys,PMD_TYPE_TABLE ); } -return early ?pud_offset_kimg (pgdp, addr) :pud_offset (pgdp, addr); +return early ?pud_offset_kimg (p4dp, addr) :pud_offset (p4dp, addr); } static void __init kasan_pte_populate(pmd_t *pmdp, unsigned long addr,
@@ -126,11 +126,11 @@ static void __init kasan_pmd_populate(pud_t *pudp, unsigned long addr, }while (pmdp++, addr = next, addr != end &&pmd_none (READ_ONCE (*pmdp))); } -static void __init kasan_pud_populate (pgd_t *pgdp,unsigned long addr, +static void __init kasan_pud_populate (p4d_t *p4dp,unsigned long addr,unsigned long end,int node,bool early) {unsigned long next; -pud_t *pudp =kasan_pud_offset (pgdp, addr, node, early); +pud_t *pudp =kasan_pud_offset (p4dp, addr, node, early); do { next = pud_addr_end(addr, end);
@@ -138,6 +138,18 @@ static void __init kasan_pud_populate(pgd_t *pgdp, unsigned long addr, }while (pudp++, addr = next, addr != end &&pud_none (READ_ONCE (*pudp))); } +static void __init kasan_p4d_populate (pgd_t *pgdp,unsigned long addr, +unsigned long end,int node,bool early) +{ +unsigned long next; +p4d_t *p4dp =p4d_offset (pgdp, addr); + +do { + next =p4d_addr_end (addr, end); +kasan_pud_populate (p4dp, addr, next, node, early); + }while (p4dp++, addr = next, addr != end); +} +static void __init kasan_pgd_populate (unsigned long addr,unsigned long end,int node,bool early) {
@@ -147,7 +159,7 @@ static void __init kasan_pgd_populate(unsigned long addr, unsigned long end, pgdp =pgd_offset_k (addr);do { next =pgd_addr_end (addr, end); -kasan_pud_populate (pgdp, addr, next, node, early); +kasan_p4d_populate (pgdp, addr, next, node, early); }while (pgdp++, addr = next, addr != end); }
arch/arm64/mm/mmu.c +34 -18
127 lines not on this page · raw message
arch/arm64/mm/pageattr.c +6 -1
@@ -198,6 +198,7 @@ void __kernel_map_pages(struct page *page, int numpages, int enable)bool kernel_page_present (struct page *page) {pgd_t *pgdp; +p4d_t *p4dp;pud_t *pudp, pud;pmd_t *pmdp, pmd;pte_t *ptep;
@@ -210,7 +211,11 @@ bool kernel_page_present(struct page *page)if (pgd_none (READ_ONCE (*pgdp)))return false; - pudp =pud_offset (pgdp, addr); + p4dp =p4d_offset (pgdp, addr); +if (p4d_none (READ_ONCE (*p4dp))) +return false; + + pudp =pud_offset (p4dp, addr); pud =READ_ONCE (*pudp);if (pud_none (pud))return false;
virt/kvm/arm/mmu.c +177 -32
388 lines not on this page · raw message
Signature · 1 line
2.24.0
Will Deacon
maintainerQuoted 7 lines · Mike Rapoport
From: Mike Rapoport <[email protected]>
This is a part of clean up of the page table manipulation code that aims to remove
asm-generic/5level-fixup.handasm-generic/pgtable-nop4d-hack.hThere is a single patch for both arm and arm64 because doing the conversion separately would mean breaking the shared mmu bits in
virt/kvm/arm.
Unfortunately, that's going to be really hard to merge, as the two architectures are maintained in different trees and the breadth of this patch series is likely to lead to conflicts in both.
Will
Marc Zyngier
maintainerQuoted 6 lines · Will Deacon
Quoted 5 lines · Mike Rapoport
From: Mike Rapoport <[email protected]>
This is a part of clean up of the page table manipulation code that aims to remove
asm-generic/5level-fixup.handasm-generic/pgtable-nop4d-hack.h
Quoted 6 lines
Quoted 2 lines
There is a single patch for both arm and arm64 because doing the conversion separately would mean breaking the shared mmu bits in
virt/kvm/arm.Unfortunately, that's going to be really hard to merge, as the two architectures are maintained in different trees and the breadth of this patch series is likely to lead to conflicts in both.
But maybe this is the reason we've all been waiting for, for which we sacrifice 32bit KVM host on the altar of progress, and finally move along.
Will and I are the only known users, and that'd be a good incentive to experience some if this 64bit goodness... ;-)
M.
Signature · 1 line
Jazz is not dead. It just smells funny...
Hi Marc,
Quoted 5 lines · Marc Zyngier
But maybe this is the reason we've all been waiting for, for which we sacrifice 32bit KVM host on the altar of progress, and finally move along.
Will and I are the only known users, and that'd be a good incentive to experience some if this 64bit goodness... ;-)
Jumping in this discussion a bit randomly, but I just wanted to share some thoughts that hopefully are relevant to this discussion and can be of interest to the community.
Context: we have a use-case where guests would need some degree of memory protection from the host for confidentiality reasons. We're currently looking at extending KVM to support this feature by enabling the stage 2 translation for the host (in the NVHE case) so we can prevent it from accessing private guest memory, in addition to many other changes required to make this work properly. We're currently at the prototyping stage, but hopefully we'll be able to share patches soon.
I'm bringing this up now because this particular use-case doesn't seem relevant in the arm32 world -- all our potential users are on arm64. However, because of the current structure of the arm/arm64 KVM host code, making significant arm64-specific changes turns out to be really hard.
We're currently left with three options:
1. move code from virt/kvm/arm and duplicate it in the arch/arm and arch/arm64 folders so the arm64 version can diverge. I can imagine this duplication isn't exactly an appealing solution from a maintainer's perspective ...
2. do changes in the virt/kvm/arm folder directly, but these must be met with matching changes in the respective arch/ folders. The code added to arch/arm, however, would be practically dead code, largely un-used and un-tested as there will be no real arm32 users of this feature.
3. have lots of kvm_arm_* callbacks stubbed for arm32, but this tends to be really hard to apply to this use-case as some of the changes are really quite intrusive.
Obviously, details matter for all of this, and lots of discussions will be needed once the patches are on the list.
But the point I'm trying to make here is the following: regardless of the option we end up choosing (most likely a mix of all three), the sole fact that we have to deal with this is clearly slowing down development of the feature.
This would a be perfectly reasonable and acceptable overhead if this had to be done to keep 32bit KVM host support for a real user community, but since it doesn't seem to exist (?), fighting with the above options feels like a lot of wasted efforts. (Note: I am not implying that Will and you are not real persons, but well, you see what I mean ;-)).
So, this is the end of my daily rant. But hopefully this other example of a real-world feature that's being held back by the 32bit KVM host code will be useful background when/if we go ahead and finally decide stop supporting it.
Thanks,
Quentin
Marc Zyngier
maintainerHi Quentin,
Quoted 8 lines · Quentin Perret
Hi Marc,
Quoted 5 lines · Marc Zyngier
But maybe this is the reason we've all been waiting for, for which we sacrifice 32bit KVM host on the altar of progress, and finally move along.
Will and I are the only known users, and that'd be a good incentive to experience some if this 64bit goodness... ;-)
[future work for which 32bit support gets in the way]
Quoted 5 lines
This would a be perfectly reasonable and acceptable overhead if this had to be done to keep 32bit KVM host support for a real user community, but since it doesn't seem to exist (?), fighting with the above options feels like a lot of wasted efforts. (Note: I am not implying that Will and you are not real persons, but well, you see what I mean ;-)).
I don't disagree at all. To be honest, I've been on the cusp of getting rid of it for a while, for multiple reasons:
- It has no users (as you noticed)
- It is hardly tested (a consequence of the above)
- It isn't feature complete (no debug, no PMU)
- It doesn't follow any of the evolution of the architecture (a more generic feature of the 32bit port, probably because people run their 64bit-capable cores in 64bit mode)
- It is becoming a mess of empty stubs
The maintenance aspect hasn't been a real problem so far. Even the NV support is only about 200 lines of stubs. But what you have in mind is going to be much more invasive, and I wouldn't want an unused feature to get in the way.
What I may end-up doing is to send a RFC series to remove the 32bit host support from the tree during in the 5.6 cycle, targeting 5.7. If someone shouts loudly during that time frame, we keep it and you'll have to work around it. If nobody cares, then dropping it is the right thing to do.
Would that be OK with you?
M.
Signature · 1 line
Jazz is not dead. It just smells funny...
Quoted 16 lines · Marc Zyngier
I don't disagree at all. To be honest, I've been on the cusp of getting rid of it for a while, for multiple reasons:
- It has no users (as you noticed)
- It is hardly tested (a consequence of the above)
- It isn't feature complete (no debug, no PMU)
- It doesn't follow any of the evolution of the architecture (a more generic feature of the 32bit port, probably because people run their 64bit-capable cores in 64bit mode)
- It is becoming a mess of empty stubsThe maintenance aspect hasn't been a real problem so far. Even the NV support is only about 200 lines of stubs. But what you have in mind is going to be much more invasive, and I wouldn't want an unused feature to get in the way.
Quoted 6 lines
What I may end-up doing is to send a RFC series to remove the 32bit host support from the tree during in the 5.6 cycle, targeting 5.7. If someone shouts loudly during that time frame, we keep it and you'll have to work around it. If nobody cares, then dropping it is the right thing to do.
Would that be OK with you?
Absolutely. And yes, if there are users of the 32 bits port, it'll be on us to work around in a clean way, but I think this is perfectly fair. I'll be happy to try and test your RFC series when it goes on the list if that can help.
Thanks!
Quentin
Quoted 6 lines · Will Deacon
Quoted 5 lines · Mike Rapoport
From: Mike Rapoport <[email protected]>
This is a part of clean up of the page table manipulation code that aims to remove
asm-generic/5level-fixup.handasm-generic/pgtable-nop4d-hack.h
Quoted 6 lines
Quoted 2 lines
There is a single patch for both arm and arm64 because doing the conversion separately would mean breaking the shared mmu bits in
virt/kvm/arm.Unfortunately, that's going to be really hard to merge, as the two architectures are maintained in different trees and the breadth of this patch series is likely to lead to conflicts in both.
I anyway realized that sending these changes arch-by-arch was not so bright idea, so my intention is to make "v2" include all the changes required to drop asm-generic/5level-fixup.h and merge it via the -mm tree.
Quoted 1 line
Will
Signature · 2 lines
Sincerely yours, Mike.