KVM: arm/arm64: Share common code in user_mem_abort()
authorPunit Agrawal <punit.agrawal@arm.com>
Tue, 11 Dec 2018 17:10:34 +0000 (17:10 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Tue, 18 Dec 2018 15:14:46 +0000 (15:14 +0000)
commit3f58bf63455588a260b6abc8761c48bc8977b919
treefbc5d4c5ae2b96bb06961ae195461480a7c2f960
parent60c3ab30d8c2ff3a52606df03f05af2aae07dc6b
KVM: arm/arm64: Share common code in user_mem_abort()

The code for operations such as marking the pfn as dirty, and
dcache/icache maintenance during stage 2 fault handling is duplicated
between normal pages and PMD hugepages.

Instead of creating another copy of the operations when we introduce
PUD hugepages, let's share them across the different pagesizes.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/mmu.c