mbox series

[v1,0/2] small kern_hyp_va() cleanups

Message ID 20240208105422.3444159-1-joey.gouly@arm.com (mailing list archive)
Headers show
Series small kern_hyp_va() cleanups | expand

Message

Joey Gouly Feb. 8, 2024, 10:54 a.m. UTC
Hello,

I wanted to add some comments to __kern_hyp_va(), since I was recently trying
to understand it, and I think it could be helpful for someone looking at it in
the future.

The second patch removes the assembly macro version, since it is unused. Maybe
(out-of-tree) pkvm uses it or it's just worth keeping around in case someone
needs it in the future. So if that patch isn't applied it's not too important.

Thanks,
Joey

Joey Gouly (2):
  KVM: arm64: add comments to __kern_hyp_va
  KVM: arm64: removed unused kern_hyp_va asm macro

 arch/arm64/include/asm/kvm_mmu.h | 41 ++++++++++++--------------------
 1 file changed, 15 insertions(+), 26 deletions(-)

Comments

Oliver Upton Feb. 8, 2024, 11:22 a.m. UTC | #1
Hi Joey,

Thanks for having a look.

On Thu, Feb 08, 2024 at 10:54:20AM +0000, Joey Gouly wrote:
> I wanted to add some comments to __kern_hyp_va(), since I was recently trying
> to understand it, and I think it could be helpful for someone looking at it in
> the future.

That part is definitely a bit screwy :)

> The second patch removes the assembly macro version, since it is unused. Maybe
> (out-of-tree) pkvm uses it or it's just worth keeping around in case someone
> needs it in the future. So if that patch isn't applied it's not too important.

Keeping unused code hanging around is rarely useful. While it is nice to
give consideration to the pKVM folks (looks like they don't need it), it
is easy enough to re-introduce later on.
Marc Zyngier Feb. 8, 2024, 12:38 p.m. UTC | #2
On Thu, 08 Feb 2024 10:54:20 +0000,
Joey Gouly <joey.gouly@arm.com> wrote:
> 
> Hello,
> 
> I wanted to add some comments to __kern_hyp_va(), since I was recently trying
> to understand it, and I think it could be helpful for someone looking at it in
> the future.
> 
> The second patch removes the assembly macro version, since it is unused. Maybe
> (out-of-tree) pkvm uses it or it's just worth keeping around in case someone
> needs it in the future. So if that patch isn't applied it's not too important.

I checked with Fuad, and he confirmed that there is no assembly code
using kern_hyp_va() left in pKVM either, so this guys is definitely a
goner.

For the series,

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

	M.
Oliver Upton Feb. 12, 2024, 8:55 p.m. UTC | #3
On Thu, 8 Feb 2024 10:54:20 +0000, Joey Gouly wrote:
> I wanted to add some comments to __kern_hyp_va(), since I was recently trying
> to understand it, and I think it could be helpful for someone looking at it in
> the future.
> 
> The second patch removes the assembly macro version, since it is unused. Maybe
> (out-of-tree) pkvm uses it or it's just worth keeping around in case someone
> needs it in the future. So if that patch isn't applied it's not too important.
> 
> [...]

Applied to kvmarm/next, thanks!

[1/2] KVM: arm64: add comments to __kern_hyp_va
      https://git.kernel.org/kvmarm/kvmarm/c/d198e2668e24
[2/2] KVM: arm64: removed unused kern_hyp_va asm macro
      https://git.kernel.org/kvmarm/kvmarm/c/a02395d0f3bf

--
Best,
Oliver