All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: arm64: user_mem_abort() improvements
@ 2020-09-01 13:33 ` Alexandru Elisei
  0 siblings, 0 replies; 22+ messages in thread
From: Alexandru Elisei @ 2020-09-01 13:33 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm; +Cc: maz

The first patch is a fix for a bug that I found by code inspection.

The second patch is an enhancement for the way user_mem_abort() handles
hugetlbfs backed VM memory.

Tested on a rockpro64 with 4K pages and hugetlbfs hugepagesz=1G (PUD sized
block mappings).  First test, guest RAM starts at 0x8100 0000
(memslot->base_gfn not aligned to 1GB); second test, guest RAM starts at
0x8000 0000, but is only 512 MB.  In both cases using PUD mappings is not
possible because either the memslot base address is not aligned, or the
mapping would extend beyond the memslot.

Without the changes, user_mem_abort() uses 4K pages to map the guest IPA.
With the patches, user_mem_abort() uses PMD block mappings (2MB) to map the
guest RAM, which means less TLB pressure and fewer stage 2 aborts.

Alexandru Elisei (2):
  KVM: arm64: Update page shift if stage 2 block mapping not supported
  KVM: arm64: Try PMD block mappings if PUD mappings are not supported

 arch/arm64/kvm/mmu.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

-- 
2.28.0

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

end of thread, other threads:[~2020-09-08 12:42 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-01 13:33 [PATCH 0/2] KVM: arm64: user_mem_abort() improvements Alexandru Elisei
2020-09-01 13:33 ` Alexandru Elisei
2020-09-01 13:33 ` [PATCH 1/2] KVM: arm64: Update page shift if stage 2 block mapping not supported Alexandru Elisei
2020-09-01 13:33   ` Alexandru Elisei
2020-09-02  0:57   ` Gavin Shan
2020-09-02  0:57     ` Gavin Shan
2020-09-01 13:33 ` [PATCH 2/2] KVM: arm64: Try PMD block mappings if PUD mappings are " Alexandru Elisei
2020-09-01 13:33   ` Alexandru Elisei
2020-09-02  1:23   ` Gavin Shan
2020-09-02  1:23     ` Gavin Shan
2020-09-02  9:01     ` Alexandru Elisei
2020-09-02  9:01       ` Alexandru Elisei
2020-09-03  0:06       ` Gavin Shan
2020-09-03  0:06         ` Gavin Shan
2020-09-04  9:58   ` Marc Zyngier
2020-09-04  9:58     ` Marc Zyngier
2020-09-08 12:23     ` Alexandru Elisei
2020-09-08 12:23       ` Alexandru Elisei
2020-09-08 12:41       ` Marc Zyngier
2020-09-08 12:41         ` Marc Zyngier
2020-09-04 10:18 ` [PATCH 0/2] KVM: arm64: user_mem_abort() improvements Marc Zyngier
2020-09-04 10:18   ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.