arm64: add finalized cap helper
Status from this message: Queued for 5.7. Thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 1 replyApplied
- v12 patches 3 repliesSuperseded
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | arm64: cpufeature: add cpus_have_final_cap()arch/ | +47 | 0 replies | |
| 2/2 | arm64: kvm: hyp: use cpus_have_final_cap()arch/ arch/ arch/ | +15 | 0 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Marc Zyngier | Suzuki K Poulose |
|---|---|---|
| 1/2 | R-b | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCHv2 0/2] arm64: add finalized cap helper
Across arm64 we use cpus_have_const_cap() to check for a capability without a runtime check. Prior to capabilities being finalized cpus_have_const_cap() falls back to a runtime check of the cpu_hwcaps array. In some cases we know that code is never invoked prior to the capabilities being finalized, and the fallback code is redundant (and unsound if ever executed in hyp context).
So that we can avoid the redundant code and detect when the caps are unexpectedly checked too early, this series adds a new cpus_have_final_cap() helper, and migrates the KVM hyp code over to it.
I'm hoping to use this as part of the entry.S -> entry-common.c conversion, and there are other places in arm64 that could potentially use this today.
Since v1 [1]
* Use system_capabilities_finalized() per Suzuki's comments
* Remove extraneous whitespace
* Add R-b tags from Marc and Suzuki
[1] https://lore.kernel.org/linux-arm-kernel/[email protected]/
Thanks,
Mark.
Mark Rutland (2):
arm64: cpufeature: add cpus_have_final_cap()
arm64: kvm: hyp: use cpus_have_final_cap()
arch/arm64/include/asm/cpufeature.h | 58 ++++++++++++++++++++++++++++++------- arch/arm64/kvm/hyp/switch.c | 14 ++++----- arch/arm64/kvm/hyp/sysreg-sr.c | 8 ++--- arch/arm64/kvm/hyp/tlb.c | 8 ++--- 4 files changed, 62 insertions(+), 26 deletions(-)
Signature · 6 lines
2.11.0 _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm