* [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
@ 2023-09-11 9:14 Aditya Gupta
2023-09-13 12:49 ` Sachin Sant
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Aditya Gupta @ 2023-09-11 9:14 UTC (permalink / raw)
To: linuxppc-dev, mpe
Cc: Sourabh Jain, Mahesh J Salgaonkar, Hari Bathini, Aneesh Kumar K.V
Presently, while reading a vmcore, makedumpfile uses
`cur_cpu_spec.mmu_features` to decide whether the crashed system had
RADIX MMU or not.
Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
a vmlinux is passed with the `-x` flag to makedumpfile), and hence
assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
MMU to be hash MMU.
Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
`cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
is accessible to makedumpfile, without needing the vmlinux file
Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
---
arch/powerpc/kexec/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kexec/core.c b/arch/powerpc/kexec/core.c
index de64c7962991..369b8334a4f0 100644
--- a/arch/powerpc/kexec/core.c
+++ b/arch/powerpc/kexec/core.c
@@ -63,6 +63,8 @@ void arch_crash_save_vmcoreinfo(void)
#ifndef CONFIG_NUMA
VMCOREINFO_SYMBOL(contig_page_data);
#endif
+ VMCOREINFO_SYMBOL(cur_cpu_spec);
+ VMCOREINFO_OFFSET(cpu_spec, mmu_features);
#if defined(CONFIG_PPC64) && defined(CONFIG_SPARSEMEM_VMEMMAP)
VMCOREINFO_SYMBOL(vmemmap_list);
VMCOREINFO_SYMBOL(mmu_vmemmap_psize);
--
2.41.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-11 9:14 [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo Aditya Gupta
@ 2023-09-13 12:49 ` Sachin Sant
2023-09-14 6:17 ` Aditya Gupta
2023-09-14 13:22 ` Michael Ellerman
2023-09-14 13:22 ` Michael Ellerman
2023-09-21 9:30 ` Michael Ellerman
2 siblings, 2 replies; 14+ messages in thread
From: Sachin Sant @ 2023-09-13 12:49 UTC (permalink / raw)
To: Aditya Gupta
Cc: Aneesh Kumar K.V, Mahesh J Salgaonkar, Sourabh Jain, linuxppc-dev,
Hari Bathini
> On 11-Sep-2023, at 2:44 PM, Aditya Gupta <adityag@linux.ibm.com> wrote:
>
> Presently, while reading a vmcore, makedumpfile uses
> `cur_cpu_spec.mmu_features` to decide whether the crashed system had
> RADIX MMU or not.
>
> Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
> a vmlinux is passed with the `-x` flag to makedumpfile), and hence
> assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
> MMU to be hash MMU.
>
> Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
> `cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
> is accessible to makedumpfile, without needing the vmlinux file
>
> Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
> ---
Thanks for the patch. With this patch applied (along with makedumpfile changes)
I am able to capture vmcore against a kernel which contains commit 8dc9a0ad0c3e
Reported-by: Sachin Sant <sachinp@linux.ibm.com>
Tested-by: Sachin Sant <sachinp@linux.ibm.com>
- Sachin
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-13 12:49 ` Sachin Sant
@ 2023-09-14 6:17 ` Aditya Gupta
2023-09-14 13:22 ` Michael Ellerman
1 sibling, 0 replies; 14+ messages in thread
From: Aditya Gupta @ 2023-09-14 6:17 UTC (permalink / raw)
To: Sachin Sant
Cc: Aneesh Kumar K.V, Mahesh J Salgaonkar, Sourabh Jain, linuxppc-dev,
Hari Bathini
Hello Sachin,
On Wed, Sep 13, 2023 at 06:19:11PM +0530, Sachin Sant wrote:
>
>
> > On 11-Sep-2023, at 2:44 PM, Aditya Gupta <adityag@linux.ibm.com> wrote:
> >
> > Presently, while reading a vmcore, makedumpfile uses
> > `cur_cpu_spec.mmu_features` to decide whether the crashed system had
> > RADIX MMU or not.
> >
> > Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
> > a vmlinux is passed with the `-x` flag to makedumpfile), and hence
> > assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
> > MMU to be hash MMU.
> >
> > Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
> > `cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
> > is accessible to makedumpfile, without needing the vmlinux file
> >
> > Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
> > ---
>
> Thanks for the patch. With this patch applied (along with makedumpfile changes)
> I am able to capture vmcore against a kernel which contains commit 8dc9a0ad0c3e
>
> Reported-by: Sachin Sant <sachinp@linux.ibm.com>
> Tested-by: Sachin Sant <sachinp@linux.ibm.com>
Thanks for testing this, and for providing the tags.
- Aditya Gupta
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-11 9:14 [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo Aditya Gupta
2023-09-13 12:49 ` Sachin Sant
@ 2023-09-14 13:22 ` Michael Ellerman
2023-09-15 6:15 ` Hari Bathini
2023-09-19 9:29 ` Aditya Gupta
2023-09-21 9:30 ` Michael Ellerman
2 siblings, 2 replies; 14+ messages in thread
From: Michael Ellerman @ 2023-09-14 13:22 UTC (permalink / raw)
To: Aditya Gupta, linuxppc-dev
Cc: Sourabh Jain, Mahesh J Salgaonkar, Hari Bathini, Aneesh Kumar K.V
Aditya Gupta <adityag@linux.ibm.com> writes:
> Presently, while reading a vmcore, makedumpfile uses
> `cur_cpu_spec.mmu_features` to decide whether the crashed system had
> RADIX MMU or not.
>
> Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
> a vmlinux is passed with the `-x` flag to makedumpfile), and hence
> assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
> MMU to be hash MMU.
>
> Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
> `cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
> is accessible to makedumpfile, without needing the vmlinux file
This looks fine.
Seems like cpu_features would be needed or at least pretty useful too?
cheers
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-13 12:49 ` Sachin Sant
2023-09-14 6:17 ` Aditya Gupta
@ 2023-09-14 13:22 ` Michael Ellerman
2023-09-14 14:37 ` Sachin Sant
1 sibling, 1 reply; 14+ messages in thread
From: Michael Ellerman @ 2023-09-14 13:22 UTC (permalink / raw)
To: Sachin Sant, Aditya Gupta
Cc: Hari Bathini, linuxppc-dev, Mahesh J Salgaonkar, Sourabh Jain,
Aneesh Kumar K.V
Sachin Sant <sachinp@linux.ibm.com> writes:
>> On 11-Sep-2023, at 2:44 PM, Aditya Gupta <adityag@linux.ibm.com> wrote:
>>
>> Presently, while reading a vmcore, makedumpfile uses
>> `cur_cpu_spec.mmu_features` to decide whether the crashed system had
>> RADIX MMU or not.
>>
>> Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
>> a vmlinux is passed with the `-x` flag to makedumpfile), and hence
>> assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
>> MMU to be hash MMU.
>>
>> Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
>> `cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
>> is accessible to makedumpfile, without needing the vmlinux file
>>
>> Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
>> ---
>
> Thanks for the patch. With this patch applied (along with makedumpfile changes)
> I am able to capture vmcore against a kernel which contains commit 8dc9a0ad0c3e
I can't find that commit? Was just wondering if it should be referenced
in the commit message.
cheers
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-14 13:22 ` Michael Ellerman
@ 2023-09-14 14:37 ` Sachin Sant
2023-09-15 1:16 ` Michael Ellerman
0 siblings, 1 reply; 14+ messages in thread
From: Sachin Sant @ 2023-09-14 14:37 UTC (permalink / raw)
To: Michael Ellerman
Cc: Aneesh Kumar K.V, Mahesh J Salgaonkar, Sourabh Jain, linuxppc-dev,
Aditya Gupta, Hari Bathini
> On 14-Sep-2023, at 6:52 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Sachin Sant <sachinp@linux.ibm.com> writes:
>>> On 11-Sep-2023, at 2:44 PM, Aditya Gupta <adityag@linux.ibm.com> wrote:
>>>
>>> Presently, while reading a vmcore, makedumpfile uses
>>> `cur_cpu_spec.mmu_features` to decide whether the crashed system had
>>> RADIX MMU or not.
>>>
>>> Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
>>> a vmlinux is passed with the `-x` flag to makedumpfile), and hence
>>> assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
>>> MMU to be hash MMU.
>>>
>>> Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
>>> `cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
>>> is accessible to makedumpfile, without needing the vmlinux file
>>>
>>> Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
>>> ---
>>
>> Thanks for the patch. With this patch applied (along with makedumpfile changes)
>> I am able to capture vmcore against a kernel which contains commit 8dc9a0ad0c3e
>
> I can't find that commit? Was just wondering if it should be referenced
> in the commit message.
>
My bad, I copied that commit id from the email when I first reported this issue
against linux-next.
The commit should be
368a0590d954: (powerpc/book3s64/vmemmap: switch radix to use a
different vmemmap handling function)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-14 14:37 ` Sachin Sant
@ 2023-09-15 1:16 ` Michael Ellerman
2023-09-19 9:17 ` Aditya Gupta
0 siblings, 1 reply; 14+ messages in thread
From: Michael Ellerman @ 2023-09-15 1:16 UTC (permalink / raw)
To: Sachin Sant
Cc: Aneesh Kumar K.V, Mahesh J Salgaonkar, Sourabh Jain, linuxppc-dev,
Aditya Gupta, Hari Bathini
Sachin Sant <sachinp@linux.ibm.com> writes:
>> On 14-Sep-2023, at 6:52 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
>>
>> Sachin Sant <sachinp@linux.ibm.com> writes:
>>>> On 11-Sep-2023, at 2:44 PM, Aditya Gupta <adityag@linux.ibm.com> wrote:
>>>>
>>>> Presently, while reading a vmcore, makedumpfile uses
>>>> `cur_cpu_spec.mmu_features` to decide whether the crashed system had
>>>> RADIX MMU or not.
>>>>
>>>> Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
>>>> a vmlinux is passed with the `-x` flag to makedumpfile), and hence
>>>> assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
>>>> MMU to be hash MMU.
>>>>
>>>> Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
>>>> `cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
>>>> is accessible to makedumpfile, without needing the vmlinux file
>>>>
>>>> Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
>>>> ---
>>>
>>> Thanks for the patch. With this patch applied (along with makedumpfile changes)
>>> I am able to capture vmcore against a kernel which contains commit 8dc9a0ad0c3e
>>
>> I can't find that commit? Was just wondering if it should be referenced
>> in the commit message.
>>
>
> My bad, I copied that commit id from the email when I first reported this issue
> against linux-next.
>
> The commit should be
> 368a0590d954: (powerpc/book3s64/vmemmap: switch radix to use a
> different vmemmap handling function)
OK thanks.
Aditya, can you please rephrase the commit message to mention how that
commit broke the previous behaviour.
Also I don't know what pgd_offset_l4 is?
cheers
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-14 13:22 ` Michael Ellerman
@ 2023-09-15 6:15 ` Hari Bathini
2023-09-19 9:29 ` Aditya Gupta
1 sibling, 0 replies; 14+ messages in thread
From: Hari Bathini @ 2023-09-15 6:15 UTC (permalink / raw)
To: Michael Ellerman, Aditya Gupta, linuxppc-dev
Cc: Aneesh Kumar K.V, Mahesh J Salgaonkar, Sourabh Jain
On 14/09/23 6:52 pm, Michael Ellerman wrote:
> Aditya Gupta <adityag@linux.ibm.com> writes:
>> Presently, while reading a vmcore, makedumpfile uses
>> `cur_cpu_spec.mmu_features` to decide whether the crashed system had
>> RADIX MMU or not.
>>
>> Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
>> a vmlinux is passed with the `-x` flag to makedumpfile), and hence
>> assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
>> MMU to be hash MMU.
>>
>> Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
>> `cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
>> is accessible to makedumpfile, without needing the vmlinux file
>
> This looks fine.
>
> Seems like cpu_features would be needed or at least pretty useful too?
Yeah. Would be nice to have access to that, to accurately identify the
kind of system vmcore was generated for.
Thanks
Hari
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-15 1:16 ` Michael Ellerman
@ 2023-09-19 9:17 ` Aditya Gupta
0 siblings, 0 replies; 14+ messages in thread
From: Aditya Gupta @ 2023-09-19 9:17 UTC (permalink / raw)
To: Michael Ellerman
Cc: Aneesh Kumar K.V, Mahesh J Salgaonkar, Sourabh Jain, linuxppc-dev,
Sachin Sant, Hari Bathini
Hello mpe,
On Fri, Sep 15, 2023 at 11:16:08AM +1000, Michael Ellerman wrote:
> Sachin Sant <sachinp@linux.ibm.com> writes:
> >> On 14-Sep-2023, at 6:52 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> >>
> >> Sachin Sant <sachinp@linux.ibm.com> writes:
> >>>> On 11-Sep-2023, at 2:44 PM, Aditya Gupta <adityag@linux.ibm.com> wrote:
> >>>>
> >>>> Presently, while reading a vmcore, makedumpfile uses
> >>>> `cur_cpu_spec.mmu_features` to decide whether the crashed system had
> >>>> RADIX MMU or not.
> >>>>
> >>>> Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
> >>>> a vmlinux is passed with the `-x` flag to makedumpfile), and hence
> >>>> assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
> >>>> MMU to be hash MMU.
> >>>>
> >>>> Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
> >>>> `cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
> >>>> is accessible to makedumpfile, without needing the vmlinux file
> >>>>
> >>>> Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
> >>>> ---
> >>>
> >>> Thanks for the patch. With this patch applied (along with makedumpfile changes)
> >>> I am able to capture vmcore against a kernel which contains commit 8dc9a0ad0c3e
> >>
> >> I can't find that commit? Was just wondering if it should be referenced
> >> in the commit message.
> >>
> >
> > My bad, I copied that commit id from the email when I first reported this issue
> > against linux-next.
> >
> > The commit should be
> > 368a0590d954: (powerpc/book3s64/vmemmap: switch radix to use a
> > different vmemmap handling function)
>
> OK thanks.
>
> Aditya, can you please rephrase the commit message to mention how that
> commit broke the previous behaviour.
Offsets were being wrongly assigned, in makedumpfile, in Radix MMU case (unless
-x vmlinux was passed to makedumpfile, which generally isn't the case)
That was happening even before the '368a0590d954' commit mentioned, it's just
that we hit the issue now, since with above commit, we needed to use those
offsets for page traversal, in makedumpfile. And those offsets were incorrecly
assigned, and hence page traversal failed.
For the offsets/shifts to be correctly assigned in makedumpfile,
`cur_cpu_spec.mmu_features` needs to be exported in VMCOREINFO by kernel.
>
> Also I don't know what pgd_offset_l4 is?
Sure, I will try to explain with more context in commit description in next
version, or directly mention the particular shifts that was wrong.
In makedumpfile, it is the offset of pgdir from the kernel pgd, for a given
virtual address
It is same as what the `pgd_index` function returns, in the powerpc
kernel source.
>
> cheers
Thanks
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-14 13:22 ` Michael Ellerman
2023-09-15 6:15 ` Hari Bathini
@ 2023-09-19 9:29 ` Aditya Gupta
2023-09-19 10:07 ` Michael Ellerman
1 sibling, 1 reply; 14+ messages in thread
From: Aditya Gupta @ 2023-09-19 9:29 UTC (permalink / raw)
To: Michael Ellerman
Cc: Sourabh Jain, linuxppc-dev, Mahesh J Salgaonkar, Hari Bathini,
Aneesh Kumar K.V
On Thu, Sep 14, 2023 at 11:22:01PM +1000, Michael Ellerman wrote:
> Aditya Gupta <adityag@linux.ibm.com> writes:
> > Presently, while reading a vmcore, makedumpfile uses
> > `cur_cpu_spec.mmu_features` to decide whether the crashed system had
> > RADIX MMU or not.
> >
> > Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
> > a vmlinux is passed with the `-x` flag to makedumpfile), and hence
> > assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
> > MMU to be hash MMU.
> >
> > Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
> > `cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
> > is accessible to makedumpfile, without needing the vmlinux file
>
> This looks fine.
>
> Seems like cpu_features would be needed or at least pretty useful too?
>
> cheers
Sure, that can be added too, to the vmcoreinfo. Not sure if it's used now, but
sure it can help to identify features in makedumpfile.
Will add it, in next version.
Thanks
- Aditya Gupta
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-19 9:29 ` Aditya Gupta
@ 2023-09-19 10:07 ` Michael Ellerman
2023-09-20 10:57 ` Aditya Gupta
0 siblings, 1 reply; 14+ messages in thread
From: Michael Ellerman @ 2023-09-19 10:07 UTC (permalink / raw)
To: Aditya Gupta
Cc: Sourabh Jain, linuxppc-dev, Mahesh J Salgaonkar, Hari Bathini,
Aneesh Kumar K.V
Aditya Gupta <adityag@linux.ibm.com> writes:
> On Thu, Sep 14, 2023 at 11:22:01PM +1000, Michael Ellerman wrote:
>> Aditya Gupta <adityag@linux.ibm.com> writes:
>> > Presently, while reading a vmcore, makedumpfile uses
>> > `cur_cpu_spec.mmu_features` to decide whether the crashed system had
>> > RADIX MMU or not.
>> >
>> > Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
>> > a vmlinux is passed with the `-x` flag to makedumpfile), and hence
>> > assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
>> > MMU to be hash MMU.
>> >
>> > Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
>> > `cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
>> > is accessible to makedumpfile, without needing the vmlinux file
>>
>> This looks fine.
>>
>> Seems like cpu_features would be needed or at least pretty useful too?
>>
>> cheers
>
> Sure, that can be added too, to the vmcoreinfo. Not sure if it's used now, but
> sure it can help to identify features in makedumpfile.
>
> Will add it, in next version.
Please do it in a separate commit to the mmu_features :)
cheers
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-19 10:07 ` Michael Ellerman
@ 2023-09-20 10:57 ` Aditya Gupta
0 siblings, 0 replies; 14+ messages in thread
From: Aditya Gupta @ 2023-09-20 10:57 UTC (permalink / raw)
To: Michael Ellerman
Cc: Sourabh Jain, linuxppc-dev, Mahesh J Salgaonkar, Hari Bathini,
Aneesh Kumar K.V
On Tue, Sep 19, 2023 at 08:07:15PM +1000, Michael Ellerman wrote:
> Aditya Gupta <adityag@linux.ibm.com> writes:
> > On Thu, Sep 14, 2023 at 11:22:01PM +1000, Michael Ellerman wrote:
> >> Aditya Gupta <adityag@linux.ibm.com> writes:
> >> > Presently, while reading a vmcore, makedumpfile uses
> >> > `cur_cpu_spec.mmu_features` to decide whether the crashed system had
> >> > RADIX MMU or not.
> >> >
> >> > Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
> >> > a vmlinux is passed with the `-x` flag to makedumpfile), and hence
> >> > assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
> >> > MMU to be hash MMU.
> >> >
> >> > Add `cur_cpu_spec` symbol and offset of `mmu_features` in the
> >> > `cpu_spec` struct, to VMCOREINFO, so that the symbol address and offset
> >> > is accessible to makedumpfile, without needing the vmlinux file
> >>
> >> This looks fine.
> >>
> >> Seems like cpu_features would be needed or at least pretty useful too?
> >>
> >> cheers
> >
> > Sure, that can be added too, to the vmcoreinfo. Not sure if it's used now, but
> > sure it can help to identify features in makedumpfile.
> >
> > Will add it, in next version.
>
> Please do it in a separate commit to the mmu_features :)
>
> cheers
Sure, have done it in a separate patch in V2.
Thanks
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-11 9:14 [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo Aditya Gupta
2023-09-13 12:49 ` Sachin Sant
2023-09-14 13:22 ` Michael Ellerman
@ 2023-09-21 9:30 ` Michael Ellerman
2023-09-22 8:24 ` Aditya Gupta
2 siblings, 1 reply; 14+ messages in thread
From: Michael Ellerman @ 2023-09-21 9:30 UTC (permalink / raw)
To: linuxppc-dev, Aditya Gupta
Cc: Hari Bathini, Aneesh Kumar K.V, Mahesh J Salgaonkar, Sourabh Jain
On Mon, 11 Sep 2023 14:44:09 +0530, Aditya Gupta wrote:
> Presently, while reading a vmcore, makedumpfile uses
> `cur_cpu_spec.mmu_features` to decide whether the crashed system had
> RADIX MMU or not.
>
> Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
> a vmlinux is passed with the `-x` flag to makedumpfile), and hence
> assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
> MMU to be hash MMU.
>
> [...]
Applied to powerpc/next.
[1/1] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
https://git.kernel.org/powerpc/c/7135b921b32966d7602ede396b7286d372aee63f
cheers
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
2023-09-21 9:30 ` Michael Ellerman
@ 2023-09-22 8:24 ` Aditya Gupta
0 siblings, 0 replies; 14+ messages in thread
From: Aditya Gupta @ 2023-09-22 8:24 UTC (permalink / raw)
To: Michael Ellerman
Cc: Hari Bathini, linuxppc-dev, Mahesh J Salgaonkar, Sourabh Jain,
Aneesh Kumar K.V
On Thu, Sep 21, 2023 at 07:30:00PM +1000, Michael Ellerman wrote:
> On Mon, 11 Sep 2023 14:44:09 +0530, Aditya Gupta wrote:
> > Presently, while reading a vmcore, makedumpfile uses
> > `cur_cpu_spec.mmu_features` to decide whether the crashed system had
> > RADIX MMU or not.
> >
> > Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless
> > a vmlinux is passed with the `-x` flag to makedumpfile), and hence
> > assigns offsets and shifts (such as pgd_offset_l4) incorrecly considering
> > MMU to be hash MMU.
> >
> > [...]
>
> Applied to powerpc/next.
>
> [1/1] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo
> https://git.kernel.org/powerpc/c/7135b921b32966d7602ede396b7286d372aee63f
>
> cheers
Thanks for the update
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-09-22 8:38 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11 9:14 [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo Aditya Gupta
2023-09-13 12:49 ` Sachin Sant
2023-09-14 6:17 ` Aditya Gupta
2023-09-14 13:22 ` Michael Ellerman
2023-09-14 14:37 ` Sachin Sant
2023-09-15 1:16 ` Michael Ellerman
2023-09-19 9:17 ` Aditya Gupta
2023-09-14 13:22 ` Michael Ellerman
2023-09-15 6:15 ` Hari Bathini
2023-09-19 9:29 ` Aditya Gupta
2023-09-19 10:07 ` Michael Ellerman
2023-09-20 10:57 ` Aditya Gupta
2023-09-21 9:30 ` Michael Ellerman
2023-09-22 8:24 ` Aditya Gupta
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).