Skip to content

KVM: arm64: Make ICH_VTR_EL2 accesses an inlined literal

Marc Zyngier kvmarm linux-arm-kernel 2 versions – Applied

Status from this message: Applied to next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 2 repliesApplied
  2. v15 patches 2 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/6KVM: arm64: vgic-v3: Make vtr_to_* helpers use architectural field symbolsarch/arm64/kvm/hyp/vgic-v3-sr.c+3 -30 replies
2/6KVM: arm64: Move GICv3 broken SEIS implementation detection to a CPU errrataarch/arm64/kernel/cpu_errata.c arch/arm64/kvm/vgic/vgic-v3.c arch/arm64/tools/cpucaps+19 -251 reply
3/6KVM: arm64: Add a helper providing an inlined literal value for ICH_VTR_EL2arch/arm64/kernel/image-vars.h arch/arm64/kvm/vgic/vgic-v3.c arch/arm64/kvm/vgic/vgic.h+73 -00 replies
4/6KVM: arm64: Convert most ICH_VTR_EL2 accesses to inlined literal valuearch/arm64/kvm/hyp/vgic-v3-sr.c+9 -90 replies
5/6KVM: arm64: vgic-v3: Simplify initial GICv3 configuration samplingarch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/hyp/vgic-v3-sr.c arch/arm64/kvm/vgic/vgic-v3.c +1 more+8 -280 replies
6/6KVM: arm64: vgic-v3: Kill kvm_vgic_global_state.ich_vtr_el2arch/arm64/kvm/nested.c arch/arm64/kvm/vgic-sys-reg-v3.c arch/arm64/kvm/vgic/vgic-v3.c +3 more+10 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/6] KVM: arm64: Make ICH_VTR_EL2 accesses an inlined literal

I'm reposting this early as there were so many issues to the original posting that I decided to deviate from my own rules... Bite me.

This is the second version of this series I initially sent as [1], which aims at removing the large number of traps that ICH_VTR_EL2 generates in NV environments, leading to pointless overheads.

By moving from a sysreg access to a patched constant, running an L3 workload with a a healthy amount of IO results in a 5% reduction of wall-clock time from a baseline without this series.

* From v1 [1]:

- Move the "broken SEIS" detection to an erratum, something it should always have been, so that vgic_broken_seis() doesn't have to use non-noinstr function calls (sashiko)

- Drop WARN_ON() in the patch function (sashiko)

- Switch from this_cpu_has_cap() to cpus_have_cap() (shashiko)

- Reorganise the patches so that some of the code movements are less surprising to our favourite Artificial Idiot

- Simplify __vgic_v3_get_config() to only return the MMIO attribute as a boolean, dropping all form of GICv5 support which made little sense

[1] https://lore.kernel.org/r/[email protected]

Marc Zyngier (6):
KVM: arm64: vgic-v3: Make vtr_to_* helpers use architectural field
symbols
KVM: arm64: Move GICv3 broken SEIS implementation detection to a CPU
errrata
KVM: arm64: Add a helper providing an inlined literal value for

    ICH_VTR_EL2

KVM: arm64: Convert most ICH_VTR_EL2 accesses to inlined literal value
KVM: arm64: vgic-v3: Simplify initial GICv3 configuration sampling
KVM: arm64: vgic-v3: Kill kvm_vgic_global_state.ich_vtr_el2

 arch/arm64/include/asm/kvm_asm.h |  2 +-
 arch/arm64/kernel/cpu_errata.c   | 17 +++++-
 arch/arm64/kernel/image-vars.h   |  1 +
 arch/arm64/kvm/hyp/vgic-v3-sr.c  | 43 +++++----------
 arch/arm64/kvm/nested.c          |  3 +-
 arch/arm64/kvm/vgic-sys-reg-v3.c |  8 +--
 arch/arm64/kvm/vgic/vgic-v3.c    | 93 +++++++++++++++++++++-----------
 arch/arm64/kvm/vgic/vgic-v5.c    |  5 +-
 arch/arm64/kvm/vgic/vgic.h       | 19 ++++++-
 arch/arm64/tools/cpucaps         |  1 +
 include/kvm/arm_vgic.h           |  2 -
 11 files changed, 118 insertions(+), 76 deletions(-)
Signature · 1 line
2.47.3