[PATCH] KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID
Oliver Upton
oliver.upton at linux.dev
Sat Feb 11 11:07:42 PST 2023
Avoid open-coding and just use the helper to encode the ID from the
sysreg table entry.
No functional change intended.
Signed-off-by: Oliver Upton <oliver.upton at linux.dev>
---
Applies to github.com/oupton/linux kvm-arm64/nv-prefix
arch/arm64/kvm/nested.c | 3 +--
1 file changed, 1 insertion(+), 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;
--
2.39.1.581.gbfd45094c4-goog
More information about the linux-arm-kernel
mailing list