linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/16] KVM: arm64: TTW reporting on SEA and 52bit PA in S1 PTW
@ 2025-08-27 16:10 Marc Zyngier
  2025-08-27 16:10 ` [PATCH 01/16] KVM: arm64: Add helper computing the state of 52bit PA support Marc Zyngier
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Marc Zyngier @ 2025-08-27 16:10 UTC (permalink / raw)
  To: kvmarm, linux-arm-kernel, kvm
  Cc: Joey Gouly, Suzuki K Poulose, Oliver Upton, Zenghui Yu

Yes, $SUBJECT rolls of the tongue.

This series was triggered by the realisation that when injecting an
SEA while on a S1PTW fault, we don't report the level of the walk and
instead give a bare SEA, which definitely violates the architecture.

This state of things dates back to the pre-NV days, when we didn't
have a S1 page table walker, and really didn't want to implement one.
I've since moved on and reluctantly implemented one, which means we
now *could* provide the level if we really wanted to.

However, nothing is that simple. The current code in at.c is firmly
48bit, as our NV implementation doesn't yet support 52bit PA, while an
EL1 VM can happily enjoy LPA and LPA2. As a result, it is necessary to
expand the S1 PTW to support both LPA and LPA2. Joy.

Then, once the above is achieved, we need to hook into the PTW
machinery to match the first level of the walk that results in
accessing the faulty address. For this, we introduce a simple filter
mechanism that could be expanded if we needed to (no, please no).

Finally, we can plug this into the fault injection path, and enjoy
seeing the translation level being populated in the ESR_ELx register.

Patches on top of 6.16-rc3.

Marc Zyngier (16):
  KVM: arm64: Add helper computing the state of 52bit PA support
  KVM: arm64: Account for 52bit when computing maximum OA
  KVM: arm64: Compute 52bit TTBR address and alignment
  KVM: arm64: Decouple output address from the PT descriptor
  KVM: arm64: Pass the walk_info structure to compute_par_s1()
  KVM: arm64: Compute shareability for LPA2
  KVM: arm64: Populate PAR_EL1 with 52bit addresses
  KVM: arm64: Expand valid block mappings to FEAT_LPA/LPA2 support
  KVM: arm64: Report faults from S1 walk setup at the expected start
    level
  KVM: arm64: Allow use of S1 PTW for non-NV vcpus
  KVM: arm64: Allow EL1 control registers to be accessed from the CPU
    state
  KVM: arm64: Don't switch MMU on translation from non-NV context
  KVM: arm64: Add filtering hook to S1 page table walk
  KVM: arm64: Add S1 IPA to page table level walker
  KVM: arm64: Populate level on S1PTW SEA injection
  KVM: arm64: selftest: Expand external_aborts test to look for TTW
    levels

 arch/arm64/include/asm/kvm_nested.h           |  25 +-
 arch/arm64/kvm/at.c                           | 341 +++++++++++++-----
 arch/arm64/kvm/inject_fault.c                 |  27 +-
 arch/arm64/kvm/nested.c                       |   2 +-
 .../selftests/kvm/arm64/external_aborts.c     |  43 +++
 .../selftests/kvm/include/arm64/processor.h   |   1 +
 .../selftests/kvm/lib/arm64/processor.c       |  13 +-
 7 files changed, 362 insertions(+), 90 deletions(-)

-- 
2.39.2



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-08-27 19:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 16:10 [PATCH 00/16] KVM: arm64: TTW reporting on SEA and 52bit PA in S1 PTW Marc Zyngier
2025-08-27 16:10 ` [PATCH 01/16] KVM: arm64: Add helper computing the state of 52bit PA support Marc Zyngier
2025-08-27 16:10 ` [PATCH 02/16] KVM: arm64: Account for 52bit when computing maximum OA Marc Zyngier
2025-08-27 16:10 ` [PATCH 03/16] KVM: arm64: Compute 52bit TTBR address and alignment Marc Zyngier
2025-08-27 16:10 ` [PATCH 04/16] KVM: arm64: Decouple output address from the PT descriptor Marc Zyngier
2025-08-27 16:10 ` [PATCH 05/16] KVM: arm64: Pass the walk_info structure to compute_par_s1() Marc Zyngier
2025-08-27 16:10 ` [PATCH 06/16] KVM: arm64: Compute shareability for LPA2 Marc Zyngier
2025-08-27 16:10 ` [PATCH 07/16] KVM: arm64: Populate PAR_EL1 with 52bit addresses Marc Zyngier
2025-08-27 16:10 ` [PATCH 08/16] KVM: arm64: Expand valid block mappings to FEAT_LPA/LPA2 support Marc Zyngier
2025-08-27 16:10 ` [PATCH 09/16] KVM: arm64: Report faults from S1 walk setup at the expected start level Marc Zyngier
2025-08-27 16:10 ` [PATCH 10/16] KVM: arm64: Allow use of S1 PTW for non-NV vcpus Marc Zyngier
2025-08-27 16:10 ` [PATCH 11/16] KVM: arm64: Allow EL1 control registers to be accessed from the CPU state Marc Zyngier
2025-08-27 16:10 ` [PATCH 12/16] KVM: arm64: Don't switch MMU on translation from non-NV context Marc Zyngier
2025-08-27 16:10 ` [PATCH 13/16] KVM: arm64: Add filtering hook to S1 page table walk Marc Zyngier
2025-08-27 16:10 ` [PATCH 14/16] KVM: arm64: Add S1 IPA to page table level walker Marc Zyngier
2025-08-27 16:10 ` [PATCH 15/16] KVM: arm64: Populate level on S1PTW SEA injection Marc Zyngier
2025-08-27 16:10 ` [PATCH 16/16] KVM: arm64: selftest: Expand external_aborts test to look for TTW levels Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).