History

scripts/gdb: set vabits_actual based on TCR_EL1

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.

Kuan-Ying Lee committed 2 years ago

Commit 04a40ba1 parent 3c0e9a21 file · +3 −1Browse files

Unified · Split

scripts/gdb/linux/mm.py+3−1
@@ -48,7 +48,9 @@ class aarch64_page_ops(): · 47 unmodified lines
48 self.VA_BITS = constants.LX_CONFIG_ARM64_VA_BITS48 self.VA_BITS = constants.LX_CONFIG_ARM64_VA_BITS
49 if self.VA_BITS > 48:49 if self.VA_BITS > 48:
50 self.VA_BITS_MIN = 4850 self.VA_BITS_MIN = 48
51 self.vabits_actual = gdb.parse_and_eval('vabits_actual')51 tcr_el1 = gdb.execute("info registers $TCR_EL1", to_string=True)
52 tcr_el1 = int(tcr_el1.split()[1], 16)
53 self.vabits_actual = 64 - ((tcr_el1 >> 16) & 63)
52 else:54 else:
53 self.VA_BITS_MIN = self.VA_BITS55 self.VA_BITS_MIN = self.VA_BITS
54 self.vabits_actual = self.VA_BITS56 self.vabits_actual = self.VA_BITS

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t