]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: MMU: mark pages that were inserted to the shadow pages table as accessed
authorIzik Eidus <izike@qumranet.com>
Mon, 26 Nov 2007 12:08:14 +0000 (14:08 +0200)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 15:53:15 +0000 (17:53 +0200)
Mark guest pages as accessed when removed from the shadow page tables for
better lru processing.

Signed-off-by: Izik Eidus <izike@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/mmu.c

index 0cb6580956ba9ea3a099fd4d43c4981cdf871a54..9b9d1b6eb2f8192b9ffec75ca60120e39aea021e 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/mm.h>
 #include <linux/highmem.h>
 #include <linux/module.h>
+#include <linux/swap.h>
 
 #include <asm/page.h>
 #include <asm/cmpxchg.h>
@@ -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