Skip to content

KVM: arm64: Work around Ampere1 erratum AC03_CPU_38

Oliver Upton kvmarm linux-arm-kernel stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3arm64: errata: Mitigate Ampere1 erratum AC03_CPU_38 at stage-2Documentation/arm64/silicon-errata.rst arch/arm64/Kconfig arch/arm64/kernel/cpu_errata.c +2 more+39 -32 replies
2/3KVM: arm64: Refactor HFGxTR configuration into separate helpersarch/arm64/kvm/hyp/include/hyp/switch.h+42 -180 replies
3/3KVM: arm64: Prevent guests from enabling HA/HD on Ampere1arch/arm64/kvm/hyp/include/hyp/switch.h+39 -00 replies

Reviews trailers per patch

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

PatchCatalin MarinasD Scott PhillipsMarc Zyngier
SeriesR-b
1/3A-b A-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/3] KVM: arm64: Work around Ampere1 erratum AC03_CPU_38

Hi folks,

Small series to work around a CPU erratum on AmpereOne. While the implementation does not advertise support for FEAT_HAFDBS (due to another erratum), the associated control bits do not have RES0 behavior as required by the architecture.

Usage of HAFDBS at stage-1 is unaffected, since HA and HD are only enabled on implementations that advertise the feature. However, KVM relies on HA having RES0 semantics if the feature isn't implemented. The end result is that KVM enables a broken hardware access flag implementation that could lead to correctness issues.

Applies to 6.4-rc1. Tested with access_tracking_perf_test, verifying that KVM is indeed taking Access Flag faults.

Oliver Upton (3):
arm64: errata: Mitigate Ampere1 erratum AC03_CPU_38 at stage-2
KVM: arm64: Refactor HFGxTR configuration into separate helpers
KVM: arm64: Prevent guests from enabling HA/HD on Ampere1

 Documentation/arm64/silicon-errata.rst  |  3 +
 arch/arm64/Kconfig                      | 17 +++++
 arch/arm64/kernel/cpu_errata.c          |  7 ++
 arch/arm64/kvm/hyp/include/hyp/switch.h | 99 ++++++++++++++++++++-----
 arch/arm64/kvm/hyp/pgtable.c            | 14 +++-
 arch/arm64/tools/cpucaps                |  1 +
 6 files changed, 120 insertions(+), 21 deletions(-)

base-commit: ac9a78681b921877518763ba0e89202254349d1b

Signature · 1 line
2.41.0.162.gfafddb0af9-goog