Skip to content

Commit 325031d

Browse files
Alexandru EliseiMarc Zyngier
authored andcommitted
KVM: arm64: Print emulated register table name when it is unsorted
When a sysreg table entry is out-of-order, KVM attempts to print the address of the table: [ 0.143911] kvm [1]: sys_reg table (____ptrval____) out of order (1) Printing the name of the table instead of a pointer is more helpful in this case. The message has also been slightly tweaked to be point out the offending entry (and to match the missing reset error message): [ 0.143891] kvm [1]: sys_reg table sys_reg_descs+0x50/0x7490 entry 1 out of order Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220428103405.70884-3-alexandru.elisei@arm.com
1 parent f1f0c0c commit 325031d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/arm64/kvm/sys_regs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2194,12 +2194,12 @@ static bool check_sysreg_table(const struct sys_reg_desc *table, unsigned int n,
21942194

21952195
for (i = 0; i < n; i++) {
21962196
if (!is_32 && table[i].reg && !table[i].reset) {
2197-
kvm_err("sys_reg table %p entry %d lacks reset\n", table, i);
2197+
kvm_err("sys_reg table %pS entry %d lacks reset\n", &table[i], i);
21982198
return false;
21992199
}
22002200

22012201
if (i && cmp_sys_reg(&table[i-1], &table[i]) >= 0) {
2202-
kvm_err("sys_reg table %p out of order (%d)\n", table, i - 1);
2202+
kvm_err("sys_reg table %pS entry %d out of order\n", &table[i - 1], i - 1);
22032203
return false;
22042204
}
22052205
}

0 commit comments

Comments
 (0)