]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Avoid mapping size adjustment on permission fault
authorMarc Zyngier <maz@kernel.org>
Mon, 26 Jul 2021 15:35:49 +0000 (16:35 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 2 Aug 2021 13:05:58 +0000 (14:05 +0100)
commitf1fe9faac06854c89320343a2dd696e0b6110280
tree2356bc2c3a50d2618f84f99fadeba59ae07d8da7
parent2458000667d12136843fc24831297d9d39a2ef08
KVM: arm64: Avoid mapping size adjustment on permission fault

Since we only support PMD-sized mappings for THP, getting
a permission fault on a level that results in a mapping
being larger than PAGE_SIZE is a sure indication that we have
already upgraded our mapping to a PMD.

In this case, there is no need to try and parse userspace page
tables, as the fault information already tells us everything.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20210726153552.1535838-4-maz@kernel.org
arch/arm64/kvm/mmu.c