]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Don't use compound_order to determine host mapping size
authorNicholas Piggin <npiggin@gmail.com>
Tue, 11 Sep 2018 10:48:34 +0000 (20:48 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 11 Sep 2018 22:50:50 +0000 (08:50 +1000)
commitaf8c96cf2b6377e66d30ba5e1301d414270427e5
tree49a72048094fc32aaddd5bbdd6332a3a79b9b7e1
parent06dc5f0b38381a7fa027f2fc102e402d482b93d0
KVM: PPC: Book3S HV: Don't use compound_order to determine host mapping size

THP paths can defer splitting compound pages until after the actual
remap and TLB flushes to split a huge PMD/PUD. This causes radix
partition scope page table mappings to get out of synch with the host
qemu page table mappings.

This results in random memory corruption in the guest when running
with THP. The easiest way to reproduce is use KVM balloon to free up
a lot of memory in the guest and then shrink the balloon to give the
memory back, while some work is being done in the guest.

Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: kvm-ppc@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/book3s_64_mmu_radix.c