All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID
@ 2023-02-11 19:07 ` Oliver Upton
  0 siblings, 0 replies; 4+ messages in thread
From: Oliver Upton @ 2023-02-11 19:07 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: James Morse, Suzuki K Poulose, kvmarm, Zenghui Yu,
	linux-arm-kernel, Christoffer Dall, Ganapatrao Kulkarni,
	Russell King, Andre Przywara, Alexandru Elisei, Oliver Upton

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@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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID
@ 2023-02-11 19:07 ` Oliver Upton
  0 siblings, 0 replies; 4+ messages in thread
From: Oliver Upton @ 2023-02-11 19:07 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: James Morse, Suzuki K Poulose, kvmarm, Zenghui Yu,
	linux-arm-kernel, Christoffer Dall, Ganapatrao Kulkarni,
	Russell King, Andre Przywara, Alexandru Elisei, Oliver Upton

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@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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID
  2023-02-11 19:07 ` Oliver Upton
@ 2023-02-11 22:07   ` Marc Zyngier
  -1 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2023-02-11 22:07 UTC (permalink / raw)
  To: Oliver Upton
  Cc: James Morse, Suzuki K Poulose, kvmarm, Zenghui Yu,
	linux-arm-kernel, Christoffer Dall, Ganapatrao Kulkarni,
	Russell King, Andre Przywara, Alexandru Elisei

On Sat, 11 Feb 2023 19:07:42 +0000,
Oliver Upton <oliver.upton@linux.dev> wrote:
> 
> 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@linux.dev>

Acked-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID
@ 2023-02-11 22:07   ` Marc Zyngier
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2023-02-11 22:07 UTC (permalink / raw)
  To: Oliver Upton
  Cc: James Morse, Suzuki K Poulose, kvmarm, Zenghui Yu,
	linux-arm-kernel, Christoffer Dall, Ganapatrao Kulkarni,
	Russell King, Andre Przywara, Alexandru Elisei

On Sat, 11 Feb 2023 19:07:42 +0000,
Oliver Upton <oliver.upton@linux.dev> wrote:
> 
> 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@linux.dev>

Acked-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-11 22:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-11 19:07 [PATCH] KVM: arm64: nv: Use reg_to_encoding() to get sysreg ID Oliver Upton
2023-02-11 19:07 ` Oliver Upton
2023-02-11 22:07 ` Marc Zyngier
2023-02-11 22:07   ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.