The patch titled Subject: scripts/gdb: set vabits_actual based on TCR_EL1 has been added to the -mm mm-nonmm-unstable branch. Its filename is scripts-gdb-set-vabits_actual-based-on-tcr_el1.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/scripts-gdb-set-vabits_actual-based-on-tcr_el1.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Kuan-Ying Lee <kuan-ying.lee@xxxxxxxxxxxxx> Subject: scripts/gdb: set vabits_actual based on TCR_EL1 Date: Wed, 19 Jun 2024 15:49:09 +0800 We encounter the following issue after commit 9cce9c6c2c3b ("arm64: mm: Handle LVA support as a CPU feature"). (gdb) lx-slabinfo Python Exception <class 'gdb.error'>: No symbol "vabits_actual" in current context. Error occurred in Python: No symbol "vabits_actual" in current context. We set vabits_actual based on TCR_EL1 value when VA_BITS is bigger than 48. Link: https://lkml.kernel.org/r/20240619074911.100434-5-kuan-ying.lee@xxxxxxxxxxxxx Fixes: 9cce9c6c2c3b ("arm64: mm: Handle LVA support as a CPU feature") Signed-off-by: Kuan-Ying Lee <kuan-ying.lee@xxxxxxxxxxxxx> Cc: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> Cc: Kieran Bingham <kbingham@xxxxxxxxxx> Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/gdb/linux/mm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/scripts/gdb/linux/mm.py~scripts-gdb-set-vabits_actual-based-on-tcr_el1 +++ a/scripts/gdb/linux/mm.py @@ -48,7 +48,9 @@ class aarch64_page_ops(): self.VA_BITS = constants.LX_CONFIG_ARM64_VA_BITS if self.VA_BITS > 48: self.VA_BITS_MIN = 48 - self.vabits_actual = gdb.parse_and_eval('vabits_actual') + tcr_el1 = gdb.execute("info registers $TCR_EL1", to_string=True) + tcr_el1 = int(tcr_el1.split()[1], 16) + self.vabits_actual = 64 - ((tcr_el1 >> 16) & 63) else: self.VA_BITS_MIN = self.VA_BITS self.vabits_actual = self.VA_BITS _ Patches currently in -mm which might be from kuan-ying.lee@xxxxxxxxxxxxx are scripts-gdb-redefine-max_order-sanely.patch scripts-gdb-rework-module-va-range.patch scripts-gdb-change-the-layout-of-vmemmap.patch scripts-gdb-set-vabits_actual-based-on-tcr_el1.patch scripts-gdb-change-va_bits_min-when-we-use-16k-page.patch scripts-gdb-rename-pool_index-to-pool_index_plus_1.patch