linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 0/9] KVM: Support PUD hugepage at stage 2
@ 2018-10-01 15:54 Punit Agrawal
  2018-10-01 15:54 ` [PATCH v8 1/9] KVM: arm/arm64: Ensure only THP is candidate for adjustment Punit Agrawal
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Punit Agrawal @ 2018-10-01 15:54 UTC (permalink / raw)
  To: kvmarm
  Cc: Punit Agrawal, marc.zyngier, will.deacon, linux-kernel,
	linux-arm-kernel, suzuki.poulose

This series is an update to the PUD hugepage support previously posted
at [0]. This patchset adds support for PUD hugepages at stage 2 a
feature that is useful on cores that have support for large sized TLB
mappings (e.g., 1GB for 4K granule).

The only change in this version is to update the kvm_stage2_has_pud()
helper for arm to use CONFIG_PGTABLE_LEVELS.

The patches are based on v6 of the dynamic IPA support.

The patches have been tested on AMD Seattle system with the following
hugepage sizes - 64K, 32M, 1G.

Thanks,
Punit

v7 -> v8

* Add kvm_stage2_has_pud() helper on arm32
* Rebased to v6 of 52bit dynamic IPA support

v6 -> v7

* Restrict thp check to exclude hugetlbfs pages - Patch 1
* Don't update PUD entry if there's no change - Patch 9
* Add check for PUD level in stage 2 - Patch 9

v5 -> v6

* Split Patch 1 to move out the refactoring of exec permissions on
  page table entries.
* Patch 4 - Initialise p*dpp pointers in stage2_get_leaf_entry()
* Patch 5 - Trigger a BUG() in kvm_pud_pfn() on arm

v4 -> v5:
* Patch 1 - Drop helper stage2_should_exec() and refactor the
  condition to decide if a page table entry should be marked
  executable
* Patch 4-6 - Introduce stage2_get_leaf_entry() and use it in this and
  latter patches
* Patch 7 - Use stage 2 accessors instead of using the page table
  helpers directly
* Patch 7 - Add a note to update the PUD hugepage support when number
  of levels of stage 2 tables differs from stage 1

v3 -> v4:
* Patch 1 and 7 - Don't put down hugepages pte if logging is enabled
* Patch 4-5 - Add PUD hugepage support for exec and access faults
* Patch 6 - PUD hugepage support for aging page table entries

v2 -> v3:
* Update vma_pagesize directly if THP [1/4]. Previsouly this was done
  indirectly via hugetlb
* Added review tag [4/4]

v1 -> v2:
* Create helper to check if the page should have exec permission [1/4]
* Fix broken condition to detect THP hugepage [1/4]
* Fix in-correct hunk resulting from a rebase [4/4]

[0] https://www.spinics.net/lists/kvm-arm/msg32753.html
[1] https://lkml.org/lkml/2018/9/26/936

Punit Agrawal (9):
  KVM: arm/arm64: Ensure only THP is candidate for adjustment
  KVM: arm/arm64: Share common code in user_mem_abort()
  KVM: arm/arm64: Re-factor setting the Stage 2 entry to exec on fault
  KVM: arm/arm64: Introduce helpers to manipulate page table entries
  KVM: arm64: Support dirty page tracking for PUD hugepages
  KVM: arm64: Support PUD hugepage in stage2_is_exec()
  KVM: arm64: Support handling access faults for PUD hugepages
  KVM: arm64: Update age handlers to support PUD hugepages
  KVM: arm64: Add support for creating PUD hugepages at stage 2

 arch/arm/include/asm/kvm_mmu.h         |  61 +++++
 arch/arm/include/asm/stage2_pgtable.h  |   9 +
 arch/arm64/include/asm/kvm_mmu.h       |  48 ++++
 arch/arm64/include/asm/pgtable-hwdef.h |   4 +
 arch/arm64/include/asm/pgtable.h       |   9 +
 virt/kvm/arm/mmu.c                     | 320 +++++++++++++++++++------
 6 files changed, 373 insertions(+), 78 deletions(-)

-- 
2.18.0


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

end of thread, other threads:[~2018-11-01  8:31 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-01 15:54 [PATCH v8 0/9] KVM: Support PUD hugepage at stage 2 Punit Agrawal
2018-10-01 15:54 ` [PATCH v8 1/9] KVM: arm/arm64: Ensure only THP is candidate for adjustment Punit Agrawal
2018-10-03 10:50   ` Marc Zyngier
2018-10-03 10:59     ` Punit Agrawal
2018-10-31 14:36   ` Christoffer Dall
2018-10-31 14:52     ` Punit Agrawal
2018-10-31 17:15       ` Punit Agrawal
2018-11-01  8:31       ` Christoffer Dall
2018-10-01 15:54 ` [PATCH v8 2/9] KVM: arm/arm64: Share common code in user_mem_abort() Punit Agrawal
2018-10-01 17:44   ` Suzuki K Poulose
2018-10-03 15:20   ` Marc Zyngier
2018-10-03 16:25     ` Punit Agrawal
2018-10-01 15:54 ` [PATCH v8 3/9] KVM: arm/arm64: Re-factor setting the Stage 2 entry to exec on fault Punit Agrawal
2018-10-01 15:54 ` [PATCH v8 4/9] KVM: arm/arm64: Introduce helpers to manipulate page table entries Punit Agrawal
2018-10-01 15:54 ` [PATCH v8 5/9] KVM: arm64: Support dirty page tracking for PUD hugepages Punit Agrawal
2018-10-01 15:54 ` [PATCH v8 6/9] KVM: arm64: Support PUD hugepage in stage2_is_exec() Punit Agrawal
2018-10-01 15:54 ` [PATCH v8 7/9] KVM: arm64: Support handling access faults for PUD hugepages Punit Agrawal
2018-10-01 15:54 ` [PATCH v8 8/9] KVM: arm64: Update age handlers to support " Punit Agrawal
2018-10-01 15:54 ` [PATCH v8 9/9] KVM: arm64: Add support for creating PUD hugepages at stage 2 Punit Agrawal
2018-10-01 21:30   ` Suzuki K Poulose
2018-10-02  8:52     ` Punit Agrawal

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).