• Alexander Graf's avatar
    KVM: PPC: Add generic hpte management functions · 7741909b
    Alexander Graf authored
    Currently the shadow paging code keeps an array of entries it knows about.
    Whenever the guest invalidates an entry, we loop through that entry,
    trying to invalidate matching parts.
    
    While this is a really simple implementation, it is probably the most
    ineffective one possible. So instead, let's keep an array of lists around
    that are indexed by a hash. This way each PTE can be added by 4 list_add,
    removed by 4 list_del invocations and the search only needs to loop through
    entries that share the same hash.
    
    This patch implements said lookup and exports generic functions that both
    the 32-bit and 64-bit backend can use.
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
    7741909b
book3s_mmu_hpte.c 7.17 KB