Skip to content

KVM: arm64: Rewrite page-table code and fault handling

Will Deacon kvmarm linux-arm-kernel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest21 patches 6 repliesIn review
  2. v421 patches 30 repliesSuperseded
  3. v321 patches 64 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v222 patches3 repliesSuperseded
v120 patches7 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21KVM: arm64: Remove kvm_mmu_free_memory_caches()arch/arm64/include/asm/kvm_mmu.h arch/arm64/kvm/arm.c arch/arm64/kvm/mmu.c+1 -80 replies
2/21KVM: arm64: Add stand-alone page-table walker infrastructurearch/arm64/include/asm/kvm_pgtable.h arch/arm64/kvm/hyp/Makefile arch/arm64/kvm/hyp/pgtable.c+390 -10 replies
3/21KVM: arm64: Add support for creating kernel-agnostic stage-1 page tablesarch/arm64/include/asm/kvm_pgtable.h arch/arm64/kvm/hyp/pgtable.c+173 -00 replies
4/21KVM: arm64: Use generic allocator for hyp stage-1 page-tablesarch/arm64/include/asm/kvm_mmu.h arch/arm64/include/asm/kvm_pgtable.h arch/arm64/include/asm/pgtable-hwdef.h +2 more+45 -4640 replies
5/21KVM: arm64: Add support for creating kernel-agnostic stage-2 page tablesarch/arm64/include/asm/kvm_host.h arch/arm64/include/asm/kvm_pgtable.h arch/arm64/kvm/hyp/pgtable.c +1 more+102 -260 replies
6/21KVM: arm64: Add support for stage-2 map()/unmap() in generic page-tablearch/arm64/include/asm/kvm_pgtable.h arch/arm64/kvm/hyp/pgtable.c+319 -01 reply
7/21KVM: arm64: Convert kvm_phys_addr_ioremap() to generic page-table APIarch/arm64/kvm/mmu.c+14 -160 replies
8/21KVM: arm64: Convert kvm_set_spte_hva() to generic page-table APIarch/arm64/kvm/mmu.c+10 -130 replies
9/21KVM: arm64: Convert unmap_stage2_range() to generic page-table APIarch/arm64/kvm/mmu.c+37 -251 reply
10/21KVM: arm64: Add support for stage-2 page-aging in generic page-tablearch/arm64/include/asm/kvm_pgtable.h arch/arm64/kvm/hyp/pgtable.c+130 -00 replies
11/21KVM: arm64: Convert page-aging and access faults to generic page-table APIarch/arm64/kvm/mmu.c+16 -580 replies
12/21KVM: arm64: Add support for stage-2 write-protect in generic page-tablearch/arm64/include/asm/kvm_pgtable.h arch/arm64/kvm/hyp/pgtable.c+24 -00 replies
13/21KVM: arm64: Convert write-protect operation to generic page-table APIarch/arm64/kvm/mmu.c+4 -210 replies
14/21KVM: arm64: Add support for stage-2 cache flushing in generic page-tablearch/arm64/include/asm/kvm_pgtable.h arch/arm64/kvm/hyp/pgtable.c+41 -00 replies
15/21KVM: arm64: Convert memslot cache-flushing code to generic page-table APIarch/arm64/kvm/mmu.c+1 -120 replies
16/21KVM: arm64: Add support for relaxing stage-2 perms in generic page-table codearch/arm64/include/asm/kvm_pgtable.h arch/arm64/kvm/hyp/pgtable.c+39 -01 reply
17/21KVM: arm64: Convert user_mem_abort() to generic page-table APIarch/arm64/kvm/mmu.c+44 -800 replies
18/21KVM: arm64: Check the pgt instead of the pgd when modifying page-tablearch/arm64/kvm/mmu.c+3 -30 replies
19/21KVM: arm64: Remove unused page-table codearch/arm64/include/asm/kvm_mmu.h arch/arm64/include/asm/pgtable-hwdef.h arch/arm64/include/asm/pgtable-prot.h +2 more+0 -11720 replies
20/21KVM: arm64: Remove unused 'pgd' field from 'struct kvm_s2_mmu'arch/arm64/include/asm/kvm_host.h arch/arm64/kvm/mmu.c+0 -30 replies
21/21KVM: arm64: Don't constrain maximum IPA size based on host configurationarch/arm64/kvm/reset.c+6 -340 replies

Reviews trailers per patch

20 of 21 patches have a Reviewed-by or Acked-by.

PatchGavin ShanAlexandru Elisei
1/21R-b
2/21R-b
3/21R-b
4/21
5/21R-b
6/21R-b
7/21R-b
8/21R-b
9/21R-b
10/21R-b
11/21R-b R-b
12/21R-b
13/21R-b
14/21R-b
15/21R-b
16/21R-b
17/21R-b R-b
18/21R-b
19/21R-b
20/21R-b
21/21R-b

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

Read the v5 thread

Cover letter [PATCH v5 00/21] KVM: arm64: Rewrite page-table code and fault handling

It's me again, with version five of the KVM page-table rework previously seen at:

v1: https://lore.kernel.org/r/[email protected]
v2: https://lore.kernel.org/r/[email protected]
v3: https://lore.kernel.org/r/[email protected]
v4: https://lore.kernel.org/r/[email protected]

Changes since v4 include:

* Add comments to the kerneldoc describing alignment behaviour for addresses and size parameters
* Fix formatting of IPA size messages
* Fix handling of unaligned addresses in kvm_phys_addr_ioremap()
* Add DSB after zeroing stage-2 PGD pages
* Add reviewer tags

Once again, thanks to Alex, Gavin and Andrew for their comments.

Will

Cc Marc Zyngier <[email protected]>
Cc Quentin Perret <[email protected]>
Cc James Morse <[email protected]>
Cc Suzuki Poulose <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Gavin Shan <[email protected]>
Cc Alexandru Elisei <[email protected]>
Cc Andrew Scull <[email protected]>

--->8

Quentin Perret (4):
KVM: arm64: Add support for stage-2 write-protect in generic
page-table
KVM: arm64: Convert write-protect operation to generic page-table API
KVM: arm64: Add support for stage-2 cache flushing in generic
page-table
KVM: arm64: Convert memslot cache-flushing code to generic page-table
API

Will Deacon (17):
KVM: arm64: Remove kvm_mmu_free_memory_caches()
KVM: arm64: Add stand-alone page-table walker infrastructure
KVM: arm64: Add support for creating kernel-agnostic stage-1 page
tables
KVM: arm64: Use generic allocator for hyp stage-1 page-tables
KVM: arm64: Add support for creating kernel-agnostic stage-2 page
tables
KVM: arm64: Add support for stage-2 map()/unmap() in generic
page-table
KVM: arm64: Convert kvm_phys_addr_ioremap() to generic page-table API
KVM: arm64: Convert kvm_set_spte_hva() to generic page-table API
KVM: arm64: Convert unmap_stage2_range() to generic page-table API
KVM: arm64: Add support for stage-2 page-aging in generic page-table
KVM: arm64: Convert page-aging and access faults to generic page-table
API
KVM: arm64: Add support for relaxing stage-2 perms in generic
page-table code
KVM: arm64: Convert user_mem_abort() to generic page-table API
KVM: arm64: Check the pgt instead of the pgd when modifying page-table
KVM: arm64: Remove unused page-table code
KVM: arm64: Remove unused 'pgd' field from 'struct kvm_s2_mmu'
KVM: arm64: Don't constrain maximum IPA size based on host
configuration

 arch/arm64/include/asm/kvm_host.h       |    2 +-
 arch/arm64/include/asm/kvm_mmu.h        |  251 +---
 arch/arm64/include/asm/kvm_pgtable.h    |  309 ++++
 arch/arm64/include/asm/pgtable-hwdef.h  |   24 -
 arch/arm64/include/asm/pgtable-prot.h   |   19 -
 arch/arm64/include/asm/stage2_pgtable.h |  215 ---
 arch/arm64/kvm/arm.c                    |    2 +-
 arch/arm64/kvm/hyp/Makefile             |    2 +-
 arch/arm64/kvm/hyp/pgtable.c            |  883 ++++++++++++
 arch/arm64/kvm/mmu.c                    | 1748 ++++-------------------
 arch/arm64/kvm/reset.c                  |   40 +-
 11 files changed, 1479 insertions(+), 2016 deletions(-)
 create mode 100644 arch/arm64/include/asm/kvm_pgtable.h
 create mode 100644 arch/arm64/kvm/hyp/pgtable.c
Signature · 6 lines
2.28.0.618.gf4bc123cb7-goog

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm