• Takuya Yoshikawa's avatar
    KVM: x86: MMU: Remove is_rmap_spte() and use is_shadow_present_pte() · afd28fe1
    Takuya Yoshikawa authored
    is_rmap_spte(), originally named is_rmap_pte(), was introduced when the
    simple reverse mapping was implemented by commit cd4a4e53
    ("[PATCH] KVM: MMU: Implement simple reverse mapping").  At that point,
    its role was clear and only rmap_add() and rmap_remove() were using it
    to select sptes that need to be reverse-mapped.
    
    Independently of that, is_shadow_present_pte() was first introduced by
    commit c7addb90 ("KVM: Allow not-present guest page faults to
    bypass kvm") to do bypass_guest_pf optimization, which does not exist
    any more.
    
    These two seem to have changed their roles somewhat, and is_rmap_spte()
    just calls is_shadow_present_pte() now.
    
    Since using both of them without clear distinction just makes the code
    confusing, remove is_rmap_spte().
    Signed-off-by: default avatarTakuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    afd28fe1
mmu_audit.c 6.79 KB