aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Upton <[email protected]>2024-06-19 17:40:27 +0000
committerOliver Upton <[email protected]>2024-06-20 17:16:44 +0000
commit4e8ff73eb7ae3f7a7ec1d59f4d54935ae28f4795 (patch)
tree7bc621c436323d13610d70b61876ddf0a3da1cec
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff)
KVM: arm64: Get sys_reg encoding from descriptor in idregs_debug_show()
KVM is about to add support for more VM-scoped feature ID regs that live outside of the id_regs[] array, which means the index of the debugfs iterator may not actually be an index into the array. Prepare by getting the sys_reg encoding from the descriptor itself. Reviewed-by: Sebastian Ott <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
-rw-r--r--arch/arm64/kvm/sys_regs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
index 22b45a15d068..ad453c7ad6cc 100644
--- a/arch/arm64/kvm/sys_regs.c
+++ b/arch/arm64/kvm/sys_regs.c
@@ -3502,7 +3502,7 @@ static int idregs_debug_show(struct seq_file *s, void *v)
return 0;
seq_printf(s, "%20s:\t%016llx\n",
- desc->name, IDREG(kvm, IDX_IDREG(kvm->arch.idreg_debugfs_iter)));
+ desc->name, IDREG(kvm, reg_to_encoding(desc)));
return 0;
}