summaryrefslogtreecommitdiff
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorBharat Bhushan <r65777@freescale.com>2013-08-07 10:03:45 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-08 00:06:12 (GMT)
commit7ea170e6c28ab1b96ebee2501d1dbb9d1fe72fb3 (patch)
treee7592f39cc9823c09a54173a9c4e8da55dd0b328 /arch/powerpc/kvm
parent9f1faf37b7c4256c9ec1763e127834e100e7e062 (diff)
downloadlinux-fsl-qoriq-7ea170e6c28ab1b96ebee2501d1dbb9d1fe72fb3.tar.xz
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 <bharat.bhushan@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de> (cherry picked from commit 84e4d632b5455082b458844b8b8cf48406e001ce)
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r--arch/powerpc/kvm/e500_mmu_host.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c
index c65593a..52de1b7 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);
}