Skip to content

Commit 3fb901c

Browse files
committed
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>
1 parent 191e0e1 commit 3fb901c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

arch/arm64/kvm/nested.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
void access_nested_id_reg(struct kvm_vcpu *v, struct sys_reg_params *p,
2727
const struct sys_reg_desc *r)
2828
{
29-
u32 id = sys_reg((u32)r->Op0, (u32)r->Op1,
30-
(u32)r->CRn, (u32)r->CRm, (u32)r->Op2);
29+
u32 id = reg_to_encoding(r);
3130
u64 val, tmp;
3231

3332
val = p->regval;

0 commit comments

Comments
 (0)