• P
    KVM: PPC: Book3S PR: Reduce number of shadow PTEs invalidated by MMU notifiers · 491d6ecc
    Paul Mackerras 提交于
    Currently, whenever any of the MMU notifier callbacks get called, we
    invalidate all the shadow PTEs.  This is inefficient because it means
    that we typically then get a lot of DSIs and ISIs in the guest to fault
    the shadow PTEs back in.  We do this even if the address range being
    notified doesn't correspond to guest memory.
    
    This commit adds code to scan the memslot array to find out what range(s)
    of guest physical addresses corresponds to the host virtual address range
    being affected.  For each such range we flush only the shadow PTEs
    for the range, on all cpus.
    Signed-off-by: NPaul Mackerras <paulus@samba.org>
    Signed-off-by: NAlexander Graf <agraf@suse.de>
    491d6ecc
book3s_pr.c 39.0 KB