Add 5-level paging support
Subsystems (2)
cover Add 5-level paging support
this patchset adds 5-level paging support in makedumpfile
-the 1th patch does some cleanup for the preparation of 5-level page tables support -the 2th patch add the 5-level page tables support
Dou Liyang (2):
arch/x86_64: Cleanup the address translation of the 4-level page
tables
arch/x86_64: Add 5-level paging support
arch/x86_64.c | 131 +++++++++++++++++++++++++++++++++++++++++---------------- makedumpfile.h | 38 +++++++++++------ 2 files changed, 120 insertions(+), 49 deletions(-)
Signature · 9 lines
2.14.3 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH RESEND 1/2 arch/x86_64: Cleanup the address translation of the 4-level page tables
Due to the changing of 4-level page tables implementation in kernel, makedumpfile left behind some of the redundant macros. this make the translation not clear and hard to expand the code to support 5-level page tables.
Remove the PML4* and PGDIR_* and unify the macro to get the index of PGD.
--- arch/x86_64.c | 59 +++++++++++++++++++++++++++++++++++----------------------- makedumpfile.h | 21 +++++++++------------ 2 files changed, 45 insertions(+), 35 deletions(-)
arch/x86_64.c +36 -23
@@ -257,7 +257,7 @@ get_versiondep_info_x86_64(void)unsigned long long __vtop4_x86_64 (unsigned long vaddr,unsigned long pagetable) { -unsigned long page_dir, pml4, pgd_paddr, pgd_pte, pmd_paddr, pmd_pte; +unsigned long page_dir, pgd, pud_paddr, pud_pte, pmd_paddr, pmd_pte;unsigned long pte_paddr, pte;/*
@@ -269,43 +269,43 @@ __vtop4_x86_64(unsigned long vaddr, unsigned long pagetable)if (page_dir ==NOT_PADDR )return NOT_PADDR ; } - page_dir +=pml4_index (vaddr) *sizeof (unsigned long ); -if (!readmem (PADDR , page_dir, &pml4,sizeof pml4)) { -ERRMSG ("Can't get pml4 (page_dir:%lx).\n" , page_dir); + page_dir +=pgd_index (vaddr) *sizeof (unsigned long ); +if (!readmem (PADDR , page_dir, &pgd,sizeof pgd)) { +ERRMSG ("Can't get pgd (page_dir:%lx).\n" , page_dir);return NOT_PADDR ; }if (info->vaddr_for_vtop == vaddr) -MSG (" PGD : %16lx => %16lx\n" , page_dir, pml4); +MSG (" PGD : %16lx => %16lx\n" , page_dir, pgd); -if (!(pml4 & _PAGE_PRESENT)) { -ERRMSG ("Can't get a valid pml4.\n" ); +if (!(pgd & _PAGE_PRESENT)) { +ERRMSG ("Can't get a valid pgd.\n" );return NOT_PADDR ; }/* * Get PUD. */ - pgd_paddr = pml4 &ENTRY_MASK ; - pgd_paddr +=pgd_index (vaddr) *sizeof (unsigned long ); -if (!readmem (PADDR , pgd_paddr, &pgd_pte,sizeof pgd_pte)) { -ERRMSG ("Can't get pgd_pte (pgd_paddr:%lx).\n" , pgd_paddr); + pud_paddr = pgd &ENTRY_MASK ; + pud_paddr +=pud_index (vaddr) *sizeof (unsigned long ); +if (!readmem (PADDR , pud_paddr, &pud_pte,sizeof pud_pte)) { +ERRMSG ("Can't get pud_pte (pud_paddr:%lx).\n" , pud_paddr);return NOT_PADDR ; }if (info->vaddr_for_vtop == vaddr) -MSG (" PUD : %16lx => %16lx\n" , pgd_paddr, pgd_pte); +MSG (" PUD : %16lx => %16lx\n" , pud_paddr, pud_pte); -if (!(pgd_pte & _PAGE_PRESENT)) { -ERRMSG ("Can't get a valid pgd_pte.\n" ); +if (!(pud_pte & _PAGE_PRESENT)) { +ERRMSG ("Can't get a valid pud_pte.\n" );return NOT_PADDR ; } -if (pgd_pte & _PAGE_PSE)/* 1GB pages */ -return (pgd_pte &ENTRY_MASK &PGDIR_MASK ) + - (vaddr & ~PGDIR_MASK ); +if (pud_pte & _PAGE_PSE)/* 1GB pages */ +return (pud_pte &ENTRY_MASK &PUD_MASK ) + + (vaddr & ~PUD_MASK );/* * Get PMD. */ - pmd_paddr = pgd_pte &ENTRY_MASK ; + pmd_paddr = pud_pte &ENTRY_MASK ; pmd_paddr +=pmd_index (vaddr) *sizeof (unsigned long );if (!readmem (PADDR , pmd_paddr, &pmd_pte,sizeof pmd_pte)) {ERRMSG ("Can't get pmd_pte (pmd_paddr:%lx).\n" , pmd_paddr);
@@ -391,15 +391,22 @@ kvtop_xen_x86_64(unsigned long kvaddr)if ((dirp =kvtop_xen_x86_64 (SYMBOL (pgd_l4))) ==NOT_PADDR )return NOT_PADDR ; - dirp +=pml4_index (kvaddr) *sizeof (unsigned long long ); + +/* +* Get PGD. +*/ + dirp +=pgd_index (kvaddr) *sizeof (unsigned long long );if (!readmem (PADDR , dirp, &entry,sizeof (entry)))return NOT_PADDR ;if (!(entry & _PAGE_PRESENT))return NOT_PADDR ; +/* +* Get PUD. +*/ dirp = entry &ENTRY_MASK ; - dirp +=pgd_index (kvaddr) *sizeof (unsigned long long ); + dirp +=pud_index (kvaddr) *sizeof (unsigned long long );if (!readmem (PADDR , dirp, &entry,sizeof (entry)))return NOT_PADDR ;
@@ -407,9 +414,12 @@ kvtop_xen_x86_64(unsigned long kvaddr)return NOT_PADDR ;if (entry & _PAGE_PSE)/* 1GB pages */ -return (entry &ENTRY_MASK &PGDIR_MASK ) + - (kvaddr & ~PGDIR_MASK ); +return (entry &ENTRY_MASK &PUD_MASK ) + + (kvaddr & ~PUD_MASK ); +/* +* Get PMD. +*/ dirp = entry &ENTRY_MASK ; dirp +=pmd_index (kvaddr) *sizeof (unsigned long long );if (!readmem (PADDR , dirp, &entry,sizeof (entry)))
@@ -422,6 +432,9 @@ kvtop_xen_x86_64(unsigned long kvaddr)return (entry &ENTRY_MASK &PMD_MASK ) + (kvaddr & ~PMD_MASK ); +/* +* Get PTE. +*/ dirp = entry &ENTRY_MASK ; dirp +=pte_index (kvaddr) *sizeof (unsigned long long );if (!readmem (PADDR , dirp, &entry,sizeof (entry)))
@@ -596,7 +609,7 @@ find_vmemmap_x86_64()* for max_paddr >> 12 page structures */ high_pfn = max_paddr >>12 ; - pgd_index =pgd4_index (vaddr_base); + pgd_index =pgd_index (vaddr_base); pgd_addr =vaddr_to_paddr (init_level4_pgt);/* address of pgd */ pgd_addr += pgd_index *sizeof (unsigned long ); page_structs_per_pud = (PTRS_PER_PUD * PTRS_PER_PMD * info->page_size) /
makedumpfile.h +9 -12
@@ -602,25 +602,22 @@ unsigned long get_kvbase_arm64(void);/* * 4 Levels paging */ -#define PML4_SHIFT (39) -#define PTRS_PER_PML4 (512) -#define PGDIR_SHIFT (30) -#define PGDIR_SIZE (1UL << PGDIR_SHIFT) -#define PGDIR_MASK (~(PGDIR_SIZE - 1)) -#define PTRS_PER_PGD (512)#define PGD_SHIFT (39)#define PUD_SHIFT (30)#define PMD_SHIFT (21) -#define PMD_SIZE (1UL << PMD_SHIFT) -#define PMD_MASK (~(PMD_SIZE - 1)) +#define PTE_SHIFT (12) + +#define PTRS_PER_PGD (512)#define PTRS_PER_PUD (512)#define PTRS_PER_PMD (512)#define PTRS_PER_PTE (512) -#define PTE_SHIFT (12) -#define pml4_index (address) (((address) >> PML4_SHIFT) & (PTRS_PER_PML4 - 1)) -#define pgd_index (address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1)) -#define pgd4_index (address) (((address) >> PGD_SHIFT) & (PTRS_PER_PGD - 1)) +#define PUD_SIZE (1UL << PUD_SHIFT) +#define PUD_MASK (~(PUD_SHIFT - 1)) +#define PMD_SIZE (1UL << PMD_SHIFT) +#define PMD_MASK (~(PMD_SIZE - 1)) + +#define pgd_index (address) (((address) >> PGD_SHIFT) & (PTRS_PER_PGD - 1))#define pud_index (address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))#define pmd_index (address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))#define pte_index (address) (((address) >> PTE_SHIFT) & (PTRS_PER_PTE - 1))
Signature · 9 lines
2.14.3 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH RESEND 2/2 arch/x86_64: Add 5-level paging support
In reply to Dou LiyangNow, kernel can use 5-level page tables in x86_64 system.
Add the 5-level paging support for makedumpfile.
--- arch/x86_64.c | 86 ++++++++++++++++++++++++++++++++++++++++++++-------------- makedumpfile.h | 17 ++++++++++++ 2 files changed, 82 insertions(+), 21 deletions(-)
arch/x86_64.c +65 -21
@@ -33,6 +33,16 @@ get_xen_p2m_mfn(void)return NOT_FOUND_LONG_VALUE ; } +static int +check_5level_paging (void ) +{ +if (SYMBOL (level4_kernel_pgt) !=NOT_FOUND_SYMBOL ) +return TRUE; +else +return FALSE; + +} +unsigned long get_kaslr_offset_x86_64 (unsigned long vaddr) {
@@ -103,6 +113,8 @@ get_page_offset_x86_64(void)if (info->kernel_version <KERNEL_VERSION (2 ,6 ,27 )) { info->page_offset = __PAGE_OFFSET_ORIG; + }else if (check_5level_paging ()) { + info->page_offset = __PAGE_OFFSET_5LEVEL; }else { info->page_offset = __PAGE_OFFSET_2_6_27; }
@@ -234,6 +246,8 @@ get_versiondep_info_x86_64(void) info->max_physmem_bits = _MAX_PHYSMEM_BITS_ORIG; else if (info->kernel_version < KERNEL_VERSION(2, 6, 31)) info->max_physmem_bits = _MAX_PHYSMEM_BITS_2_6_26; + else if(check_5level_paging()) + info->max_physmem_bits = _MAX_PHYSMEM_BITS_5LEVEL; else info->max_physmem_bits = _MAX_PHYSMEM_BITS_2_6_31;
@@ -243,6 +257,9 @@ get_versiondep_info_x86_64(void)if (info->kernel_version <KERNEL_VERSION (2 ,6 ,31 )) { info->vmemmap_start =VMEMMAP_START_ORIG ; info->vmemmap_end =VMEMMAP_END_ORIG ; + }else if (check_5level_paging ()) { + info->vmemmap_start =VMEMMAP_START_5LEVEL ; + info->vmemmap_end =VMEMMAP_END_5LEVEL ; }else { info->vmemmap_start =VMEMMAP_START_2_6_31 ; info->vmemmap_end =VMEMMAP_END_2_6_31 ;
@@ -259,6 +276,7 @@ __vtop4_x86_64(unsigned long vaddr, unsigned long pagetable) {unsigned long page_dir, pgd, pud_paddr, pud_pte, pmd_paddr, pmd_pte;unsigned long pte_paddr, pte; +unsigned long p4d_paddr, p4d_pte;/* * Get PGD.
@@ -269,23 +287,56 @@ __vtop4_x86_64(unsigned long vaddr, unsigned long pagetable)if (page_dir ==NOT_PADDR )return NOT_PADDR ; } - page_dir +=pgd_index (vaddr) *sizeof (unsigned long ); -if (!readmem (PADDR , page_dir, &pgd,sizeof pgd)) { -ERRMSG ("Can't get pgd (page_dir:%lx).\n" , page_dir); -return NOT_PADDR ; - } -if (info->vaddr_for_vtop == vaddr) -MSG (" PGD : %16lx => %16lx\n" , page_dir, pgd); -if (!(pgd & _PAGE_PRESENT)) { -ERRMSG ("Can't get a valid pgd.\n" ); -return NOT_PADDR ; +if (check_5level_paging ()) { + page_dir +=pgd5_index (vaddr) *sizeof (unsigned long ); +if (!readmem (PADDR , page_dir, &pgd,sizeof pgd)) { +ERRMSG ("Can't get pgd (page_dir:%lx).\n" , page_dir); +return NOT_PADDR ; + } +if (info->vaddr_for_vtop == vaddr) +MSG (" PGD : %16lx => %16lx\n" , page_dir, pgd); + +if (!(pgd & _PAGE_PRESENT)) { +ERRMSG ("Can't get a valid pgd.\n" ); +return NOT_PADDR ; + } +/* +* Get P4D. +*/ + p4d_paddr = pgd &ENTRY_MASK ; + p4d_paddr +=p4d_index (vaddr) *sizeof (unsigned long ); +if (!readmem (PADDR , p4d_paddr, &p4d_pte,sizeof p4d_pte)) { +ERRMSG ("Can't get p4d_pte (p4d_paddr:%lx).\n" , p4d_paddr); +return NOT_PADDR ; + } +if (info->vaddr_for_vtop == vaddr) +MSG (" P4D : %16lx => %16lx\n" , p4d_paddr, p4d_pte); + +if (!(p4d_pte & _PAGE_PRESENT)) { +ERRMSG ("Can't get a valid p4d_pte.\n" ); +return NOT_PADDR ; + } + pud_paddr = p4d_pte &ENTRY_MASK ; + }else { + page_dir +=pgd_index (vaddr) *sizeof (unsigned long ); +if (!readmem (PADDR , page_dir, &pgd,sizeof pgd)) { +ERRMSG ("Can't get pgd (page_dir:%lx).\n" , page_dir); +return NOT_PADDR ; + } +if (info->vaddr_for_vtop == vaddr) +MSG (" PGD : %16lx => %16lx\n" , page_dir, pgd); + +if (!(pgd & _PAGE_PRESENT)) { +ERRMSG ("Can't get a valid pgd.\n" ); +return NOT_PADDR ; + } + pud_paddr = pgd &ENTRY_MASK ; }/* * Get PUD. */ - pud_paddr = pgd &ENTRY_MASK ; pud_paddr +=pud_index (vaddr) *sizeof (unsigned long );if (!readmem (PADDR , pud_paddr, &pud_pte,sizeof pud_pte)) {ERRMSG ("Can't get pud_pte (pud_paddr:%lx).\n" , pud_paddr);
@@ -352,12 +403,7 @@ vtop4_x86_64(unsigned long vaddr)else if (SYMBOL (init_top_pgt) !=NOT_FOUND_SYMBOL ) init_level4_pgt =SYMBOL (init_top_pgt);else { -ERRMSG ("Can't get the symbol of init_level4_pgt.\n" ); -return NOT_PADDR ; - } - -if (SYMBOL (level4_kernel_pgt) !=NOT_FOUND_SYMBOL ) { -ERRMSG ("Kernel is built with 5-level page tables\n" ); +ERRMSG ("Can't get the symbol of init_level4_pgt/init_top_pgt.\n" );return NOT_PADDR ; }
@@ -596,10 +642,6 @@ find_vmemmap_x86_64()return FAILED ; } -if (SYMBOL (level4_kernel_pgt) !=NOT_FOUND_SYMBOL ) { -ERRMSG ("kernel is configured for 5-level page tables\n" ); -return FAILED ; - } pagestructsize = size_table.page; hugepagesize =PTRS_PER_PMD * info->page_size; vaddr_base = info->vmemmap_start;
@@ -621,12 +663,14 @@ find_vmemmap_x86_64()/* outer loop is for pud entries in the pgd */ for (pgdindex =0 , pgdp = (unsigned long *)pgd_addr; pgdindex < num_puds; pgdindex++, pgdp++) { +/* read the pgd one word at a time, into pud_addr */ if (!readmem (PADDR , (unsigned long long )pgdp, (void *)&pud_addr,sizeof (unsigned long ))) {ERRMSG ("Can't get pgd entry for slot %d.\n" , pgd_index);return FAILED ; } +/* mask the pgd entry for the address of the pud page */ pud_addr &=PMASK ;if (pud_addr ==0 )
makedumpfile.h +17 -0
@@ -581,16 +581,21 @@ unsigned long get_kvbase_arm64(void);#ifdef __x86_64__#define __PAGE_OFFSET_ORIG (0xffff810000000000)/* 2.6.26, or former */ #define __PAGE_OFFSET_2_6_27 (0xffff880000000000)/* 2.6.27, or later */ +#define __PAGE_OFFSET_5LEVEL (0xff10000000000000)/* 5-level page table */ #define VMALLOC_START_ORIG (0xffffc20000000000)/* 2.6.30, or former */ #define VMALLOC_START_2_6_31 (0xffffc90000000000)/* 2.6.31, or later */ +#define VMALLOC_START_5LEVEL (0xffa0000000000000)/* 5-level page table */ #define VMALLOC_END_ORIG (0xffffe1ffffffffff)/* 2.6.30, or former */ #define VMALLOC_END_2_6_31 (0xffffe8ffffffffff)/* 2.6.31, or later */ +#define VMALLOC_END_5LEVEL (0xffd1ffffffffffff)/* 5-level page table */ #define VMEMMAP_START_ORIG (0xffffe20000000000)/* 2.6.30, or former */ #define VMEMMAP_START_2_6_31 (0xffffea0000000000)/* 2.6.31, or later */ +#define VMEMMAP_START_5LEVEL (0xffd4000000000000)/* 5-level page table */ #define VMEMMAP_END_ORIG (0xffffe2ffffffffff)/* 2.6.30, or former */ #define VMEMMAP_END_2_6_31 (0xffffeaffffffffff)/* 2.6.31, or later */ +#define VMEMMAP_END_5LEVEL (0xffd5ffffffffffff)/* 5-level page table */ #define __START_KERNEL_map (0xffffffff80000000)#define KVBASE PAGE_OFFSET
@@ -598,6 +603,7 @@ unsigned long get_kvbase_arm64(void);#define _MAX_PHYSMEM_BITS_ORIG (40)#define _MAX_PHYSMEM_BITS_2_6_26 (44)#define _MAX_PHYSMEM_BITS_2_6_31 (46) +#define _MAX_PHYSMEM_BITS_5LEVEL (52)/* * 4 Levels paging
@@ -617,7 +623,18 @@ unsigned long get_kvbase_arm64(void);#define PMD_SIZE (1UL << PMD_SHIFT)#define PMD_MASK (~(PMD_SIZE - 1)) +/* +* 5 Levels paging +*/ +#define PGD_SHIFT_5LEVEL (48) +#define P4D_SHIFT (39) + +#define PTRS_PER_PGD_5LEVEL (512) +#define PTRS_PER_P4D (512) + +#define pgd5_index (address) (((address) >> PGD_SHIFT_5LEVEL) & (PTRS_PER_PGD_5LEVEL - 1))#define pgd_index (address) (((address) >> PGD_SHIFT) & (PTRS_PER_PGD - 1)) +#define p4d_index (address) (((address) >> P4D_SHIFT) & (PTRS_PER_P4D - 1))#define pud_index (address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))#define pmd_index (address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))#define pte_index (address) (((address) >> PTE_SHIFT) & (PTRS_PER_PTE - 1))
Signature · 9 lines
2.14.3 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Hi dou,
Quoted 9 lines · Dou Liyang
this patchset adds 5-level paging support in makedumpfile
-the 1th patch does some cleanup for the preparation of 5-level page tables support -the 2th patch add the 5-level page tables support
Dou Liyang (2):
arch/x86_64: Cleanup the address translation of the 4-level page
tables
arch/x86_64: Add 5-level paging support
It doesn't work on my qemu+la57, kernel 4.16-rc1+. Not sure what kernel you are testing, it truly works on kernel 4.16-rc1+ when cpu la57 is not supported?
Thanks
Baoquan
Quoted 15 lines
arch/x86_64.c | 131 +++++++++++++++++++++++++++++++++++++++++---------------- makedumpfile.h | 38 +++++++++++------ 2 files changed, 120 insertions(+), 49 deletions(-)Signature · 9 lines
2.14.3 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi Baoquan,
Quoted 8 lines · Baoquan He
Hi dou,
Quoted 5 lines · Dou Liyang
this patchset adds 5-level paging support in makedumpfile
-the 1th patch does some cleanup for the preparation of 5-level page tables support -the 2th patch add the 5-level page tables support
Quoted 7 lines
Quoted 4 lines
Dou Liyang (2):
arch/x86_64: Cleanup the address translation of the 4-level page
tables
arch/x86_64: Add 5-level paging supportIt doesn't work on my qemu+la57, kernel 4.16-rc1+. Not sure what kernel you are testing, it truly works on kernel 4.16-rc1+ when cpu la57 is not
I tested in Linux v4.15+ and v4.16-rc2+.
The following commits in linux kernel changed mem_section array and it causes this problem in makedumpfile.
commit 83e3c48729d9ebb7af5a31a504f3fd6aff0348c4
Author: Kirill A. Shutemov <[email protected]> Date: Fri Sep 29 17:08:16 2017 +0300
commit 629a359bdb0e0652a8227b4ff3125431995fec6e
Author: Kirill A. Shutemov <[email protected]> Date: Tue Nov 7 11:33:37 2017 +0300
So when I tested makedumpfile, I reverted these commits from kernel temporarily.
Thanks
dou
Quoted 23 lines
supported?
Thanks
BaoquanQuoted 15 lines
arch/x86_64.c | 131 +++++++++++++++++++++++++++++++++++++++++---------------- makedumpfile.h | 38 +++++++++++------ 2 files changed, 120 insertions(+), 49 deletions(-)Signature · 9 lines
2.14.3 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 28 lines · Dou Liyang
Hi Baoquan,
Quoted 8 lines · Baoquan He
Hi dou,
Quoted 5 lines · Dou Liyang
this patchset adds 5-level paging support in makedumpfile
-the 1th patch does some cleanup for the preparation of 5-level page tables support -the 2th patch add the 5-level page tables support
Quoted 7 lines
Quoted 4 lines
Dou Liyang (2):
arch/x86_64: Cleanup the address translation of the 4-level page
tables
arch/x86_64: Add 5-level paging supportIt doesn't work on my qemu+la57, kernel 4.16-rc1+. Not sure what kernel you are testing, it truly works on kernel 4.16-rc1+ when cpu la57 is not
I tested in Linux v4.15+ and v4.16-rc2+.
The following commits in linux kernel changed
mem_sectionarray and it causes this problem in makedumpfile.commit
83e3c48729d9ebb7af5a31a504f3fd6aff0348c4Author: Kirill A. Shutemov <[email protected]> Date: Fri Sep 29 17:08:16 2017 +0300
Quoted 6 lines
commit
629a359bdb0e0652a8227b4ff3125431995fec6eAuthor: Kirill A. Shutemov <[email protected]> Date: Tue Nov 7 11:33:37 2017 +0300So when I tested makedumpfile, I reverted these commits from kernel temporarily.
Hmm, how much memory do you reserve for crashkernel? I am afraid both of them need be kept in kernel, since makedumpfile need be adapted to kernel, might be not the opposite. My personal opinion.
So what's your plan about these two reverted commits? Will you change it in kernel, or just leave it as is and may post another patch to fix it?
I will take time to check this issue, maybe later. Not sure what makedumpfile maintainers plan to do about these?
Thanks
Baoquan
Quoted 27 lines
Quoted 24 lines
supported?
Thanks
BaoquanQuoted 15 lines
arch/x86_64.c | 131 +++++++++++++++++++++++++++++++++++++++++---------------- makedumpfile.h | 38 +++++++++++------ 2 files changed, 120 insertions(+), 49 deletions(-)Signature · 9 lines
2.14.3 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 4 lines
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi Baoquan,
Quoted 29 lines · Baoquan He
Quoted 28 lines · Dou Liyang
Hi Baoquan,
Quoted 8 lines · Baoquan He
Hi dou,
Quoted 5 lines · Dou Liyang
this patchset adds 5-level paging support in makedumpfile
-the 1th patch does some cleanup for the preparation of 5-level page tables support -the 2th patch add the 5-level page tables support
Quoted 7 lines
Quoted 4 lines
Dou Liyang (2):
arch/x86_64: Cleanup the address translation of the 4-level page
tables
arch/x86_64: Add 5-level paging supportIt doesn't work on my qemu+la57, kernel 4.16-rc1+. Not sure what kernel you are testing, it truly works on kernel 4.16-rc1+ when cpu la57 is not
I tested in Linux v4.15+ and v4.16-rc2+.
The following commits in linux kernel changed
mem_sectionarray and it causes this problem in makedumpfile.commit
83e3c48729d9ebb7af5a31a504f3fd6aff0348c4Author: Kirill A. Shutemov <[email protected]> Date: Fri Sep 29 17:08:16 2017 +0300
Quoted 8 lines
Quoted 6 lines
commit
629a359bdb0e0652a8227b4ff3125431995fec6eAuthor: Kirill A. Shutemov <[email protected]> Date: Tue Nov 7 11:33:37 2017 +0300So when I tested makedumpfile, I reverted these commits from kernel temporarily.
Hmm, how much memory do you reserve for crashkernel? I am afraid both of
768M as you suggested.
Quoted 2 lines
them need be kept in kernel, since makedumpfile need be adapted to kernel, might be not the opposite. My personal opinion.
Yes, I agree, revert them just for temporarily tests.
Quoted 5 lines
So what's your plan about these two reverted commits? Will you change it in kernel, or just leave it as is and may post another patch to fix it?
I have no idea about it. IMO, It need to be fixed in makedumpfile tools.
Resently, I found Thadeu posted a patch about the mem_section.
[PATCH makedumpfile] handle mem_section as either a pointer or an array
I tested makedumpfile with this patch, also can't fix the problem
BTW, it seems I misunderstood you comments, the problem I met only happened with the following command, which we discussed before.
/makedumpfile -x vmlinux vmcore vmcore_file
Using the makedumpfile as core_collector in /etc/kdump.conf is OK for me. So, can you gave me your error log?
I will retest this patch without reverting this two commits tomorrow.
Thanks
dou
Quoted 40 lines
I will take time to check this issue, maybe later. Not sure what makedumpfile maintainers plan to do about these?
Thanks
BaoquanQuoted 31 lines
Quoted 24 lines
supported?
Thanks
BaoquanQuoted 15 lines
arch/x86_64.c | 131 +++++++++++++++++++++++++++++++++++++++++---------------- makedumpfile.h | 38 +++++++++++------ 2 files changed, 120 insertions(+), 49 deletions(-)Signature · 9 lines
2.14.3 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 36 lines · Dou Liyang
Hi Baoquan,
Quoted 33 lines · Baoquan He
Quoted 32 lines · Dou Liyang
Hi Baoquan,
Quoted 8 lines · Baoquan He
Hi dou,
Quoted 5 lines · Dou Liyang
this patchset adds 5-level paging support in makedumpfile
-the 1th patch does some cleanup for the preparation of 5-level page tables support -the 2th patch add the 5-level page tables support
Quoted 7 lines
Quoted 4 lines
Dou Liyang (2):
arch/x86_64: Cleanup the address translation of the 4-level page
tables
arch/x86_64: Add 5-level paging supportIt doesn't work on my qemu+la57, kernel 4.16-rc1+. Not sure what kernel you are testing, it truly works on kernel 4.16-rc1+ when cpu la57 is not
I tested in Linux v4.15+ and v4.16-rc2+.
The following commits in linux kernel changed
mem_sectionarray and it causes this problem in makedumpfile.commit
83e3c48729d9ebb7af5a31a504f3fd6aff0348c4Author: Kirill A. Shutemov <[email protected]> Date: Fri Sep 29 17:08:16 2017 +0300commit
629a359bdb0e0652a8227b4ff3125431995fec6eAuthor: Kirill A. Shutemov <[email protected]> Date: Tue Nov 7 11:33:37 2017 +0300
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
So when I tested makedumpfile, I reverted these commits from kernel temporarily.
Hmm, how much memory do you reserve for crashkernel? I am afraid both of
768M as you suggested.
You can try my latest post about the sparse_init code optimization, now 256M crashkernel works.
Quoted 5 lines
Quoted 3 lines
them need be kept in kernel, since makedumpfile need be adapted to kernel, might be not the opposite. My personal opinion.
Yes, I agree, revert them just for temporarily tests.
OK, maybe better mention it in cover letter or git log.
Quoted 19 lines
Quoted 6 lines
So what's your plan about these two reverted commits? Will you change it in kernel, or just leave it as is and may post another patch to fix it?
I have no idea about it. IMO, It need to be fixed in makedumpfile tools.
Resently, I found Thadeu posted a patch about the
mem_section.[PATCH makedumpfile] handle
mem_sectionas either a pointer or an arrayI tested makedumpfile with this patch, also can't fix the problem
BTW, it seems I misunderstood you comments, the problem I met only happened with the following command, which we discussed before.
Quoted 6 lines
/makedumpfile -x vmlinux vmcore
vmcore_fileUsing the makedumpfile as
core_collectorin/etc/kdump.confis OK for me. So, can you gave me your error log?I will retest this patch without reverting this two commits tomorrow.
OK, it doesn't work to use makedumpfile as core_collector in kdump kernel. I didn't do anything special, just use qemu with cpu+la57, and set CONFIG_X86_5LEVEL=y. If you can't reproduce it, I will send you the error log.
Thanks
Baoquan
Quoted 44 lines
Quoted 41 lines
I will take time to check this issue, maybe later. Not sure what makedumpfile maintainers plan to do about these?
Thanks
BaoquanQuoted 31 lines
Quoted 24 lines
supported?
Thanks
BaoquanQuoted 15 lines
arch/x86_64.c | 131 +++++++++++++++++++++++++++++++++++++++++---------------- makedumpfile.h | 38 +++++++++++------ 2 files changed, 120 insertions(+), 49 deletions(-)Signature · 9 lines
2.14.3 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 4 lines
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec