• Nicholas Piggin's avatar
    KVM: PPC: Book3S HV: Don't use compound_order to determine host mapping size · 71d29f43
    Nicholas Piggin authored
    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: default avatarNicholas Piggin <npiggin@gmail.com>
    Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
    71d29f43
book3s_64_mmu_radix.c 21.9 KB