• Paul Mackerras's avatar
    KVM: PPC: Book3S HV: Implement H_CLEAR_REF and H_CLEAR_MOD · cdeee518
    Paul Mackerras authored
    This adds implementations for the H_CLEAR_REF (test and clear reference
    bit) and H_CLEAR_MOD (test and clear changed bit) hypercalls.
    
    When clearing the reference or change bit in the guest view of the HPTE,
    we also have to clear it in the real HPTE so that we can detect future
    references or changes.  When we do so, we transfer the R or C bit value
    to the rmap entry for the underlying host page so that kvm_age_hva_hv(),
    kvm_test_age_hva_hv() and kvmppc_hv_get_dirty_log() know that the page
    has been referenced and/or changed.
    
    These hypercalls are not used by Linux guests.  These implementations
    have been tested using a FreeBSD guest.
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
    cdeee518
book3s_hv_rm_mmu.c 26.5 KB