]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Unify handling THP backed host memory
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 7 May 2020 12:35:46 +0000 (20:35 +0800)
committerMarc Zyngier <maz@kernel.org>
Sat, 16 May 2020 14:05:02 +0000 (15:05 +0100)
commit99fe671aeec3bf8dfb2c44f911d2ac0a25a3cb13
tree04995559765da1a9c84113ea5d2b657d68ef6413
parent904f25d75a2f37381994841690f24cac82ada2ed
KVM: arm64: Unify handling THP backed host memory

We support mapping host memory backed by PMD transparent hugepages
at stage2 as huge pages. However the checks are now spread across
two different places. Let us unify the handling of the THPs to
keep the code cleaner (and future proof for PUD THP support).
This patch moves transparent_hugepage_adjust() closer to the caller
to avoid a forward declaration for fault_supports_stage2_huge_mappings().

Also, since we already handle the case where the host VA and the guest
PA may not be aligned, the explicit VM_BUG_ON() is not required.

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200507123546.1875-3-yuzenghui@huawei.com
arch/arm64/kvm/mmu.c