]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: Enforce PTE mappings at stage2 when needed
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Tue, 12 Mar 2019 09:52:51 +0000 (09:52 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Tue, 19 Mar 2019 18:01:57 +0000 (18:01 +0000)
commitb731e4668d2a05cc62a3195d82276111ee3638be
tree86a4c1704fc2d2b4287dd72cf6eca94ed8359f44
parent07af36c786af3af1af9373727805a6ce66b12c8e
KVM: arm/arm64: Enforce PTE mappings at stage2 when needed

commit c1048ca8a243190 ("KVM: arm/arm64: Fix unintended stage 2 PMD mappings")
made the checks to skip huge mappings, stricter. However it introduced
a bug where we still use huge mappings, ignoring the flag to
use PTE mappings, by not reseting the vma_pagesize to PAGE_SIZE.

Also, the checks do not cover the PUD huge pages, that was
under review during the same period. This patch fixes both
the issues.

Fixes : c1048ca8a243190 ("KVM: arm/arm64: Fix unintended stage 2 PMD mappings")
Reported-by: Zenghui Yu <yuzenghui@huawei.com>
Cc: Zenghui Yu <yuzenghui@huawei.com>
Cc: 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