[PATCH 0/2] KVM: arm64: user_mem_abort() improvements
alexandru.elisei at arm.com
Tue Sep 1 09:33:55 EDT 2020
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(-)
More information about the linux-arm-kernel