Skip to content

KVM: arm64: nv: Implement FEAT_XNX and FEAT_HAF

Oliver Upton kvmarm 3 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. v3 Latest15 patches 5 repliesApplied
  2. v214 patches 6 repliesSuperseded
  3. v112 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- Don't use uninitialized XN value in kvm_pgtable_stage2_relax_perms()
- Pass vcpu pointer directly in the stage-2 PTW
- Ensure LL/SC swap implementation correctly handles compare failures
- Fix SRCU imbalance

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/15arm64: Detect FEAT_XNXarch/arm64/kernel/cpufeature.c arch/arm64/tools/cpucaps+8 -00 replies
2/15KVM: arm64: Add support for FEAT_XNX stage-2 permissionsarch/arm64/include/asm/kvm_pgtable.h arch/arm64/kvm/hyp/pgtable.c+60 -150 replies
3/15KVM: arm64: nv: Forward FEAT_XNX permissions to the shadow stage-2arch/arm64/include/asm/kvm_nested.h arch/arm64/kvm/mmu.c arch/arm64/kvm/nested.c+57 -80 replies
4/15KVM: arm64: Teach ptdump about FEAT_XNX permissionsarch/arm64/kvm/ptdump.c+27 -81 reply
5/15KVM: arm64: nv: Advertise support for FEAT_XNXarch/arm64/kvm/nested.c+0 -10 replies
6/15KVM: arm64: Call helper for reading descriptors directlyarch/arm64/kvm/nested.c+8 -100 replies
7/15KVM: arm64: nv: Stop passing vCPU through void ptr in S2 PTWarch/arm64/kvm/nested.c+4 -80 replies
8/15KVM: arm64: Handle endianness in read helper for emulated PTWarch/arm64/kvm/at.c arch/arm64/kvm/nested.c+39 -180 replies
9/15KVM: arm64: nv: Use pgtable definitions in stage-2 walkarch/arm64/kvm/nested.c+15 -60 replies
10/15KVM: arm64: Add helper for swapping guest descriptorarch/arm64/include/asm/kvm_nested.h arch/arm64/kvm/at.c+89 -00 replies
11/15KVM: arm64: Propagate PTW errors up to AT emulationarch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/at.c arch/arm64/kvm/sys_regs.c+39 -190 replies
12/15KVM: arm64: Implement HW access flag management in stage-1 SW PTWarch/arm64/include/asm/kvm_nested.h arch/arm64/kvm/at.c+32 -20 replies
13/15KVM: arm64: nv: Implement HW access flag management in stage-2 SW PTWarch/arm64/kvm/mmu.c arch/arm64/kvm/nested.c+42 -70 replies
14/15KVM: arm64: nv: Expose hardware access flag management to NV guestsarch/arm64/kvm/nested.c+4 -20 replies
15/15KVM: arm64: selftests: Add test for AT emulationtools/testing/selftests/kvm/Makefile.kvm tools/testing/selftests/kvm/arm64/at.c tools/testing/selftests/kvm/include/kvm_util.h +1 more+178 -02 replies

Reviews trailers per patch

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

PatchMarc Zyngier
SeriesR-b T-b
1/15
2/15
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15
12/15
13/15
14/15
15/15

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

Read the v3 thread

Cover letter [PATCH v3 00/15] KVM: arm64: nv: Implement FEAT_XNX and FEAT_HAF

Fixes all the issues Marc found in v2:

v2: https://lore.kernel.org/kvmarm/[email protected]/

v2 -> v3:
- Don't use uninitialized XN value in kvm_pgtable_stage2_relax_perms()
- Pass vcpu pointer directly in the stage-2 PTW
- Ensure LL/SC swap implementation correctly handles compare failures
- Fix SRCU imbalance

Oliver Upton (15):
arm64: Detect FEAT_XNX
KVM: arm64: Add support for FEAT_XNX stage-2 permissions
KVM: arm64: nv: Forward FEAT_XNX permissions to the shadow stage-2
KVM: arm64: Teach ptdump about FEAT_XNX permissions
KVM: arm64: nv: Advertise support for FEAT_XNX
KVM: arm64: Call helper for reading descriptors directly
KVM: arm64: nv: Stop passing vCPU through void ptr in S2 PTW
KVM: arm64: Handle endianness in read helper for emulated PTW
KVM: arm64: nv: Use pgtable definitions in stage-2 walk
KVM: arm64: Add helper for swapping guest descriptor
KVM: arm64: Propagate PTW errors up to AT emulation
KVM: arm64: Implement HW access flag management in stage-1 SW PTW
KVM: arm64: nv: Implement HW access flag management in stage-2 SW PTW
KVM: arm64: nv: Expose hardware access flag management to NV guests
KVM: arm64: selftests: Add test for AT emulation

 arch/arm64/include/asm/kvm_asm.h              |   6 +-
 arch/arm64/include/asm/kvm_nested.h           |  40 +++-
 arch/arm64/include/asm/kvm_pgtable.h          |  17 +-
 arch/arm64/kernel/cpufeature.c                |   7 +
 arch/arm64/kvm/at.c                           | 186 ++++++++++++++++--
 arch/arm64/kvm/hyp/pgtable.c                  |  58 +++++-
 arch/arm64/kvm/mmu.c                          |  28 ++-
 arch/arm64/kvm/nested.c                       | 126 ++++++++----
 arch/arm64/kvm/ptdump.c                       |  35 +++-
 arch/arm64/kvm/sys_regs.c                     |   9 +-
 arch/arm64/tools/cpucaps                      |   1 +
 tools/testing/selftests/kvm/Makefile.kvm      |   1 +
 tools/testing/selftests/kvm/arm64/at.c        | 172 ++++++++++++++++
 .../testing/selftests/kvm/include/kvm_util.h  |   1 +
 tools/testing/selftests/kvm/lib/kvm_util.c    |  10 +
 15 files changed, 602 insertions(+), 95 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/arm64/at.c

base-commit: dcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa

Signature · 1 line
2.47.3