From: Izik Eidus Date: Mon, 26 Nov 2007 12:08:14 +0000 (+0200) Subject: KVM: MMU: mark pages that were inserted to the shadow pages table as accessed X-Git-Tag: v2.6.25-rc1~1138^2~81 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=448353caeab1d9180f12194a80790859ddbeebd5;p=linux-2.6 KVM: MMU: mark pages that were inserted to the shadow pages table as accessed Mark guest pages as accessed when removed from the shadow page tables for better lru processing. Signed-off-by: Izik Eidus Signed-off-by: Avi Kivity --- diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index 0cb6580956..9b9d1b6eb2 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -438,6 +439,7 @@ static void rmap_remove(struct kvm *kvm, u64 *spte) return; sp = page_header(__pa(spte)); page = pfn_to_page((*spte & PT64_BASE_ADDR_MASK) >> PAGE_SHIFT); + mark_page_accessed(page); if (is_writeble_pte(*spte)) kvm_release_page_dirty(page); else