summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/nested.c
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2023-02-11 22:07:42 +0300
committerOliver Upton <oliver.upton@linux.dev>2023-02-12 01:10:34 +0300
commit3fb901cdc9e4ab01aa32abe93004f94cdfe75648 (patch)
treea1c75815eaec4968c49f5b4b9673728c9af2c483 /arch/arm64/kvm/nested.c
parent191e0e155521182051fc2f32dde237b6fde2b0b4 (diff)
downloadlinux-3fb901cdc9e4ab01aa32abe93004f94cdfe75648.tar.xz
KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID
Avoid open-coding and just use the helper to encode the ID from the sysreg table entry. No functional change intended. Acked-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230211190742.49843-1-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/kvm/nested.c')
-rw-r--r--arch/arm64/kvm/nested.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c
index f7ec27c27a4f..315354d27978 100644
--- a/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -26,8 +26,7 @@
void access_nested_id_reg(struct kvm_vcpu *v, struct sys_reg_params *p,
const struct sys_reg_desc *r)
{
- u32 id = sys_reg((u32)r->Op0, (u32)r->Op1,
- (u32)r->CRn, (u32)r->CRm, (u32)r->Op2);
+ u32 id = reg_to_encoding(r);
u64 val, tmp;
val = p->regval;