KVM: arm/arm64: Handle hva aging while destroying the vm
authorSuzuki K Poulose <Suzuki.Poulose@arm.com>
Wed, 5 Jul 2017 08:57:00 +0000 (09:57 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Tue, 25 Jul 2017 13:21:22 +0000 (14:21 +0100)
commit7e5a672289c9754d07e1c3b33649786d3d70f5e4
treec2d1573adab0b1781395a20195d52f70d2c33e4c
parentd9f89b4e9290e46cd9b273e9ad0bff0f93e86fae
KVM: arm/arm64: Handle hva aging while destroying the vm

The mmu_notifier_release() callback of KVM triggers cleaning up
the stage2 page table on kvm-arm. However there could be other
notifier callbacks in parallel with the mmu_notifier_release(),
which could cause the call backs ending up in an empty stage2
page table. Make sure we check it for all the notifier callbacks.

Cc: stable@vger.kernel.org
Fixes: commit 293f29363 ("kvm-arm: Unmap shadow pagetables properly")
Reported-by: Alex Graf <agraf@suse.de>
Reviewed-by: Christoffer Dall <cdall@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/mmu.c