Skip to contentSkip to conversation

KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID

PATCH In review Oliver Upton 2 participants 2 messages Feb 11, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

Applies to github.com/oupton/linux kvm-arm64/nv-prefix

 arch/arm64/kvm/nested.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/kvm/nested.c +1 -2
index f7ec27c27a4f..315354d27978 100644
@@ -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;
Signature · 7 lines
2.39.1.581.gbfd45094c4-goog


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel