• David Matlack's avatar
    KVM: x86/mmu: Pass the memslot around via struct kvm_page_fault · e710c5f6
    David Matlack authored
    The memslot for the faulting gfn is used throughout the page fault
    handling code, so capture it in kvm_page_fault as soon as we know the
    gfn and use it in the page fault handling code that has direct access
    to the kvm_page_fault struct.  Replace various tests using is_noslot_pfn
    with more direct tests on fault->slot being NULL.
    
    This, in combination with the subsequent patch, improves "Populate
    memory time" in dirty_log_perf_test by 5% when using the legacy MMU.
    There is no discerable improvement to the performance of the TDP MMU.
    
    No functional change intended.
    Suggested-by: default avatarBen Gardon <bgardon@google.com>
    Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
    Message-Id: <20210813203504.2742757-4-dmatlack@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    e710c5f6
paging_tmpl.h 32.7 KB