[Crash-utility] [PATCH] arm64: Use CONFIG_ARM64_VA_BITS to initialize VA_BITS_ACTUAL

HAGIO KAZUHITO(萩尾 一仁) k-hagio-ab at nec.com
Thu Feb 10 08:21:52 UTC 2022


Hi Huang,

thanks for the patch.

-----Original Message-----
> For DISKDUMP case, we can get VA_BITS_ACTUAL from CONFIG_ARM64_VA_BITS.

I could not understand this, there is a case where CONFIG_ARM64_VA_BITS
is different from VA_BITS_ACTUAL and why is this only for DISKDUMP case?

If the patch intends to guess the value of VA_BITS_ACTUAL to be the same as
CONFIG_ARM64_VA_BITS when no NUMBER(TCR_EL1_T1SZ), I think that DISKDUMP
check is not needed and it would be better to write such a commit log and
a comment e.g. "/* guess */" on the else if block.

Thanks,
Kazu

> Without this patch, we may have to use "--machdep vabits_actual=48" to
> set the VA_BITS_ACTUAL.
> 
> Signed-off-by: Huang Shijie <shijie at os.amperecomputing.com>
> ---
>  arm64.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arm64.c b/arm64.c
> index 4f2c2b5..2b3ec02 100644
> --- a/arm64.c
> +++ b/arm64.c
> @@ -4170,6 +4170,12 @@ arm64_calc_VA_BITS(void)
>  			} else if (machdep->machspec->VA_BITS_ACTUAL) {
>  				machdep->machspec->VA_BITS = machdep->machspec->VA_BITS_ACTUAL;
>  				machdep->machspec->VA_START = _VA_START(machdep->machspec->VA_BITS_ACTUAL);
> +			} else if (pc->flags & DISKDUMP) {
> +				if (machdep->machspec->CONFIG_ARM64_VA_BITS) {
> +					machdep->machspec->VA_BITS_ACTUAL =
> machdep->machspec->CONFIG_ARM64_VA_BITS;
> +					machdep->machspec->VA_BITS =
> machdep->machspec->CONFIG_ARM64_VA_BITS;
> +					machdep->machspec->VA_START =
> _VA_START(machdep->machspec->VA_BITS_ACTUAL);
> +				}
>  			} else
>  				error(FATAL, "cannot determine VA_BITS_ACTUAL\n");
>  		}
> --
> 2.30.2
> 
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://listman.redhat.com/mailman/listinfo/crash-utility





More information about the Crash-utility mailing list