• Paolo Bonzini's avatar
    KVM: x86: introduce kvm_mmu_invalidate_gva · 5efac074
    Paolo Bonzini authored
    Wrap the combination of mmu->invlpg and kvm_x86_ops->tlb_flush_gva
    into a new function.  This function also lets us specify the host PGD to
    invalidate and also the MMU, both of which will be useful in fixing and
    simplifying kvm_inject_emulated_page_fault.
    
    A nested guest's MMU however has g_context->invlpg == NULL.  Instead of
    setting it to nonpaging_invlpg, make kvm_mmu_invalidate_gva the only
    entry point to mmu->invlpg and make a NULL invlpg pointer equivalent
    to nonpaging_invlpg, saving a retpoline.
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    5efac074
mmu.c 170 KB