From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Thu, 31 Jan 2019 09:03:40 -0500 (EST) From: Dave Anderson Message-ID: <132532178.73826890.1548943420033.JavaMail.zimbra@redhat.com> In-Reply-To: <20190131014800.GB15785@dhcp-128-65.nay.redhat.com> References: <1548850991-11879-1-git-send-email-bhsharma@redhat.com> <20190131014800.GB15785@dhcp-128-65.nay.redhat.com> Subject: Re: [PATCH] arm64, vmcoreinfo : Append 'MAX_USER_VA_BITS' and 'MAX_PHYSMEM_BITS' to vmcoreinfo MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Dave Young Cc: Mark Rutland , Kazuhito Hagio , lijiang@redhat.com, bhe@redhat.com, ard biesheuvel , catalin marinas , Bhupesh Sharma , kexec@lists.infradead.org, Will Deacon , AKASHI Takahiro , James Morse , Borislav Petkov , bhupesh linux , linux-arm-kernel@lists.infradead.org ----- Original Message ----- > + more people > On 01/30/19 at 05:53pm, Bhupesh Sharma wrote: > > With ARMv8.2-LVA and LPA architecture extensions, arm64 hardware which > > supports these extensions can support upto 52-bit virtual and 52-bit > > physical addresses respectively. > > > > Since at the moment we enable the support of these extensions via CONFIG > > flags, e.g. > > - LPA via CONFIG_ARM64_PA_BITS_52 > > > > there are no clear mechanisms in user-space right now to > > deteremine these CONFIG flag values and also determine the PARange and > > VARange address values. > > > > User-space tools like 'makedumpfile' and 'crash-utility' can instead > > use the 'MAX_USER_VA_BITS' and 'MAX_PHYSMEM_BITS' values to determine > > the maximum virtual address and physical address (respectively) > > supported by underlying kernel. > > > > A reference 'makedumpfile' implementation which uses this approach to > > determining the maximum physical address is available in [0]. > > > > [0]. > > https://github.com/bhupesh-sharma/makedumpfile/blob/52-bit-pa-support-via-vmcore-v1/arch/arm64.c#L490 > > I'm not objecting the patch, just want to make sure to make clear about > things and make sure these issues are aware by people, and leave arm > people to review the arm bits. > > 1. MAX_PHYSMEM_BITS > As we previously found, back to 2014 makedumpfile took a patch to read the > value from vmcore but the kernel patch was not accepted. > So we should first make clear if this is really needed, why other arches > do not need this in makedumpfile. > > If we really need it then should it be arm64 only? > > If it is arm64 only then the makedumpfile code should read this number > only for arm64. With respect to the crash utility, this is the first time/architecture where the determination of MAX_PHYSMEM_BITS cannot be determined. > > Also Lianbo added the vmcoreinfo documents, I believe it stays in -tip > tree, need to make sure to document this as well. > > 2. MAX_USER_VA_BITS > Does makedumpfile care about userspace VA bits? I do not see other code > doing this, Kazu and Dave A should be able to comment. > > I tend to doubt about this. With respect to the crash utility, this won't be required because there is the exported "vabits_user" variable. Dave Anderson > > > > > Cc: AKASHI Takahiro > > Cc: Mark Rutland > > Cc: Will Deacon > > Cc: James Morse > > Signed-off-by: Bhupesh Sharma > > --- > > arch/arm64/kernel/crash_core.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/arch/arm64/kernel/crash_core.c > > b/arch/arm64/kernel/crash_core.c > > index ca4c3e12d8c5..ad231be5c0d8 100644 > > --- a/arch/arm64/kernel/crash_core.c > > +++ b/arch/arm64/kernel/crash_core.c > > @@ -10,6 +10,8 @@ > > void arch_crash_save_vmcoreinfo(void) > > { > > VMCOREINFO_NUMBER(VA_BITS); > > + VMCOREINFO_NUMBER(MAX_USER_VA_BITS); > > + VMCOREINFO_NUMBER(MAX_PHYSMEM_BITS); > > /* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */ > > vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n", > > kimage_voffset); > > -- > > 2.7.4 > > > > > > _______________________________________________ > > kexec mailing list > > kexec@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/kexec > > Thanks > Dave > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec