From: Bharat Bhushan Date: Wed, 7 Aug 2013 10:03:45 +0000 (+0530) Subject: kvm: powerpc: e500: mark page accessed when mapping a guest page X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=84e4d632b5455082b458844b8b8cf48406e001ce;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git kvm: powerpc: e500: mark page accessed when mapping a guest page Mark the guest page as accessed so that there is likely less chances of this page getting swap-out. Signed-off-by: Bharat Bhushan Acked-by: Scott Wood Signed-off-by: Alexander Graf --- diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c index 1c6a9d729df4..8f0d532522db 100644 --- a/arch/powerpc/kvm/e500_mmu_host.c +++ b/arch/powerpc/kvm/e500_mmu_host.c @@ -253,6 +253,9 @@ static inline void kvmppc_e500_ref_setup(struct tlbe_ref *ref, ref->pfn = pfn; ref->flags |= E500_TLB_VALID; + /* Mark the page accessed */ + kvm_set_pfn_accessed(pfn); + if (tlbe_is_writable(gtlbe)) kvm_set_pfn_dirty(pfn); }