makedumpfile: s390x: Fix KVBASE to correct value for s390x arcitecture.
Subsystems (2)
PATCH 1/1 makedumpfile: s390x: Fix KVBASE to correct value for s390x arcitecture.
From: Mahesh Salgaonkar <[email protected]>
While excluding free pages from s390x dumps taken on LPAR, makedumpfile fails to convert page address to pfn. The reason is, the memory for mem_section structure is allocated below '_stext' and since KVBASE is set to SYMBOL(_stext), the function is_kvaddr() fails and return NULL address.
Set KVBASE to KENRELBASE(0) for s390x architecture to fix this issue.
---
makedumpfile.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
makedumpfile.h +1 -1
@@ -615,7 +615,7 @@ do { \#ifdef __s390x__#define __PAGE_OFFSET (info->page_size - 1)#define KERNELBASE (0) -#define KVBASE (SYMBOL(_stext)) +#define KVBASE KERNELBASE#define _SECTION_SIZE_BITS (28)#define _MAX_PHYSMEM_BITS (42)
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi Mahesh,
Quoted 8 lines · On Tue, 15 Mar 2011 22:39:23 +0530 Mahesh J Salgaonkar…
From: Mahesh Salgaonkar <[email protected]>
While excluding free pages from s390x dumps taken on LPAR, makedumpfile fails to convert page address to pfn. The reason is, the memory for
mem_sectionstructure is allocated below '_stext' and since KVBASE is set toSYMBOL(_stext), the functionis_kvaddr()fails and return NULL address.
Why do we need this patch ?
to support the latest kernel version of s390 ?
or to support LPAR of s390 ?
I'd like to know whether we need a similar change for the other architecture. I will appreciate if getting a hint.
Thanks
Ken'ichi Ohmichi
Quoted 14 lines
Set KVBASE to KENRELBASE(0) for s390x architecture to fix this issue.
Signed-off-by Mahesh Salgaonkar <[email protected]>---
makedumpfile.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)makedumpfile.h +0
-0
makedumpfile.h do { \ · line 621
Quoted 8 lines
makedumpfile.h +1
-1@@ -615,7 +615,7 @@ do { \#ifdef __s390x__#define __PAGE_OFFSET (info->page_size - 1)#define KERNELBASE (0) -#define KVBASE (SYMBOL(_stext)) +#define KVBASE KERNELBASE#define _SECTION_SIZE_BITS (28)#define _MAX_PHYSMEM_BITS (42)
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hello Ken'inchi,
Quoted 13 lines · Ken'ichi Ohmichi
Hi Mahesh,
Quoted 8 lines · On Tue, 15 Mar 2011 22:39:23 +0530 Mahesh J Salgaonkar…
From: Mahesh Salgaonkar <[email protected]>
While excluding free pages from s390x dumps taken on LPAR, makedumpfile fails to convert page address to pfn. The reason is, the memory for
mem_sectionstructure is allocated below '_stext' and since KVBASE is set toSYMBOL(_stext), the functionis_kvaddr()fails and return NULL address.
Quoted 3 lines
Why do we need this patch ?
to support the latest kernel version of s390 ?
or to support LPAR of s390 ?
The problem is that on s390 depending on the kernel configuration it can happen that memory below _stext is available for buffer allocation. Therefore the mem_section structure has been allocated below _stext. On s390 the kernel page tables have a 1:1 mapping from 0 to memory_end (memory holes are possible). Therefore I think the check "> 0" is ok for s390.
Quoted 3 lines
I'd like to know whether we need a similar change for the other architecture. I will appreciate if getting a hint.
Not sure, if other architectures use memory below _stext for buffer allocation.
Michael
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi Michael,
Thank you for the explanation.
Quoted 19 lines · On Fri, 18 Mar 2011 11:11:37 +0100 Michael Holzheu…
Quoted 13 lines · Ken'ichi Ohmichi
Hi Mahesh,
Quoted 8 lines · On Tue, 15 Mar 2011 22:39:23 +0530 Mahesh J Salgaonkar…
From: Mahesh Salgaonkar <[email protected]>
While excluding free pages from s390x dumps taken on LPAR, makedumpfile fails to convert page address to pfn. The reason is, the memory for
mem_sectionstructure is allocated below '_stext' and since KVBASE is set toSYMBOL(_stext), the functionis_kvaddr()fails and return NULL address.Quoted 3 lines
Why do we need this patch ?
to support the latest kernel version of s390 ?
or to support LPAR of s390 ?
Quoted 6 lines
The problem is that on s390 depending on the kernel configuration it can happen that memory below
_stextis available for buffer allocation. Therefore themem_sectionstructure has been allocated below_stext. On s390 the kernel page tables have a 1:1 mapping from 0 tomemory_end(memory holes are possible). Therefore I think the check "> 0" is ok for s390.
I see. And I confirmed there is the same code (kvbase is 0) in the crash utility in the case of s390x, so this change is right. Mahesh's patch has been merged to the git tree.
Thanks
Ken'ichi Ohmichi
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec