]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit71d29f43b6332badc5598c656616a62575e83342
tree49a72048094fc32aaddd5bbdd6332a3a79b9b7e1
parent425333bf3a7743715c17e503049d0837d6c4a603
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