Skip to content

Fix guest_memfd and protected VMs on systems with pages larger than 4K

Vincent Donnefort kvmarm linux-arm-kernel stable 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 Latest4 patches 1 replyApplied
  2. v16 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- Use forward declarations (Marc)
- gmem_abort(): rename local gfn to canonical_gfn (Wei-Lin)
- Pick up Reviewed-by and Tested-by tags
- Rebase on v7.3-rc5

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: arm64: Fix MMFR0 TGRAN advertisement for pVMsarch/arm64/kvm/hyp/nvhe/sys_regs.c+3 -00 replies
2/4KVM: arm64: Pass kvm_s2_fault_desc to fault_supports_stage2_huge_mapping()arch/arm64/kvm/mmu.c+19 -200 replies
3/4KVM: arm64: Use kvm_s2_fault_vma_info in gmem_abort()arch/arm64/kvm/mmu.c+34 -330 replies
4/4KVM: arm64: Use kvm_s2_fault_vma_info in pkvm_mem_abort()arch/arm64/kvm/mmu.c arch/arm64/kvm/pkvm.c+21 -90 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchFuad TabbaWei-Lin Chang
1/4T-b R-b
2/4R-b T-b R-b
3/4
4/4R-b T-b

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

Read the v2 thread

Cover letter [PATCH v2 0/4] Fix guest_memfd and protected VMs on systems with pages larger than 4K

This series allows booting protected VMs and guest_memfd-back VMs on systems with a page size larger than 4K.

Currently, the fault handling assumes 4K alignment, as HPFAR_EL2 provides the IPA minus the bottom 12 bits regardless of the system page size. This leads to mapping failures on 16K and 64K systems.

This series addresses the alignment mismatch by relying on struct kvm_s2_fault_vma_info in both gmem_abort() and pkvm_mem_abort() to retrieve correctly page-aligned addresses.

This series bundles the following previously discussed fixes:

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

v2:
- Use forward declarations (Marc)
- gmem_abort(): rename local gfn to canonical_gfn (Wei-Lin)
- Pick up Reviewed-by and Tested-by tags
- Rebase on v7.3-rc5

v1: https://lore.kernel.org/all/[email protected]/

Fuad Tabba (1):
KVM: arm64: Use kvm_s2_fault_vma_info in gmem_abort()

Vincent Donnefort (3):
KVM: arm64: Fix MMFR0 TGRAN advertisement for pVMs
KVM: arm64: Pass kvm_s2_fault_desc to
fault_supports_stage2_huge_mapping()
KVM: arm64: Use kvm_s2_fault_vma_info in pkvm_mem_abort()

 arch/arm64/kvm/hyp/nvhe/sys_regs.c |   3 +
 arch/arm64/kvm/mmu.c               | 129 +++++++++++++++--------------
 arch/arm64/kvm/pkvm.c              |   3 +
 3 files changed, 75 insertions(+), 60 deletions(-)

base-commit: 72d3fcf802c45d00b300f25b848a93c3a2bd7c7e

Signature · 1 line
2.56.0.rc1.315.gc6ed9934b7-goog