• David Matlack's avatar
    KVM: x86/mmu: Improve TLB flush comment in kvm_mmu_slot_remove_write_access() · 6ff94f27
    David Matlack authored
    Rewrite the comment in kvm_mmu_slot_remove_write_access() that explains
    why it is safe to flush TLBs outside of the MMU lock after
    write-protecting SPTEs for dirty logging. The current comment is a long
    run-on sentence that was difficult to understand. In addition it was
    specific to the shadow MMU (mentioning mmu_spte_update()) when the TDP
    MMU has to handle this as well.
    
    The new comment explains:
     - Why the TLB flush is necessary at all.
     - Why it is desirable to do the TLB flush outside of the MMU lock.
     - Why it is safe to do the TLB flush outside of the MMU lock.
    
    No functional change intended.
    Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
    Message-Id: <20220113233020.3986005-5-dmatlack@google.com>
    Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    6ff94f27
mmu.c 169 KB