• Paul Mackerras's avatar
    KVM: PPC: Book3S PR: Mark pages accessed, and dirty if being written · adc0bafe
    Paul Mackerras authored
    The mark_page_dirty() function, despite what its name might suggest,
    doesn't actually mark the page as dirty as far as the MM subsystem is
    concerned.  It merely sets a bit in KVM's map of dirty pages, if
    userspace has requested dirty tracking for the relevant memslot.
    To tell the MM subsystem that the page is dirty, we have to call
    kvm_set_pfn_dirty() (or an equivalent such as SetPageDirty()).
    
    This adds a call to kvm_set_pfn_dirty(), and while we are here, also
    adds a call to kvm_set_pfn_accessed() to tell the MM subsystem that
    the page has been accessed.  Since we are now using the pfn in
    several places, this adds a 'pfn' variable to store it and changes
    the places that used hpaddr >> PAGE_SHIFT to use pfn instead, which
    is the same thing.
    
    This also changes a use of HPTE_R_PP to PP_RXRX.  Both are 3, but
    PP_RXRX is more informative as being the read-only page permission
    bit setting.
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    adc0bafe
book3s_64_mmu_host.c 10.1 KB