• Paul Mackerras's avatar
    KVM: PPC: Book3S HV: Radix page fault handler optimizations · c4c8a764
    Paul Mackerras authored
    This improves the handling of transparent huge pages in the radix
    hypervisor page fault handler.  Previously, if a small page is faulted
    in to a 2MB region of guest physical space, that means that there is
    a page table pointer at the PMD level, which could never be replaced
    by a leaf (2MB) PMD entry.  This adds the code to clear the PMD,
    invlidate the page walk cache and free the page table page in this
    situation, so that the leaf PMD entry can be created.
    
    This also adds code to check whether a PMD or PTE being inserted is
    the same as is already there (because of a race with another CPU that
    faulted on the same page) and if so, we don't replace the existing
    entry, meaning that we don't invalidate the PTE or PMD and do a TLB
    invalidation.
    Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
    c4c8a764
book3s_64_mmu_radix.c 18.3 KB