Skip to content

arm64: KVM: Kiss hyp_alternate_select() goodbye

Marc Zyngier kvm kvmarm linux-arm-kernel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3arm64: KVM: Drop hyp_alternate_select for checking for ARM64_WORKAROUND_834220arch/arm64/kvm/hyp/switch.c+2 -150 replies
2/3arm64: KVM: Replace hyp_alternate_select with has_vhe()arch/arm64/kvm/hyp/tlb.c+22 -140 replies
3/3arm64: KVM: Kill hyp_alternate_select()arch/arm64/include/asm/kvm_hyp.h+0 -240 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchChristoffer DallAndrew Jones
SeriesR-b R-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] arm64: KVM: Kiss hyp_alternate_select() goodbye

hyp_alternate_select() is a leftover from the my second attempt at supporting VHE (the first one was never merged, thankfully), and is now an irrelevant relic. It was a way to patch function pointers without having to dereference memory, a bit like static keys for function calls.

Lovely idea, but since Christoffer mostly separated the VHE and !VHE hypervisor paths, most of the uses of hyp_alternate_select() are gone. What is left is two instances that are better replaced by already existing static keys. One of the instances becomes cpus_have_const_cap(), and the rest is a light sprinkling of has_vhe().

So off it goes.

Marc Zyngier (3):
arm64: KVM: Drop hyp_alternate_select for checking for

    ARM64_WORKAROUND_834220

arm64: KVM: Replace hyp_alternate_select with has_vhe()
arm64: KVM: Kill hyp_alternate_select()

 arch/arm64/include/asm/kvm_hyp.h | 24 ---------------------
 arch/arm64/kvm/hyp/switch.c      | 17 ++-------------
 arch/arm64/kvm/hyp/tlb.c         | 36 +++++++++++++++++++-------------
 3 files changed, 24 insertions(+), 53 deletions(-)
Signature · 1 line
2.20.1