]> git.hungrycats.org Git - linux/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:18:15 +0000 (09:18 +0200)
commit970f5df113b1a5ba12777f91c9e3896e44b27707
treee120ce8987846ad88467dc18c43a173fefe858ea
parentba73c6ed5010eeae91ed38ea171722be917359d4
KVM: PPC: Book3S HV: Don't use compound_order to determine host mapping size

[ Upstream commit 71d29f43b6332badc5598c656616a62575e83342 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kvm/book3s_64_mmu_radix.c