Commit 448353ca authored by Izik Eidus's avatar Izik Eidus Committed by Avi Kivity

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: default avatarIzik Eidus <izike@qumranet.com>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent eb9774f0
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/swap.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/cmpxchg.h> #include <asm/cmpxchg.h>
...@@ -438,6 +439,7 @@ static void rmap_remove(struct kvm *kvm, u64 *spte) ...@@ -438,6 +439,7 @@ static void rmap_remove(struct kvm *kvm, u64 *spte)
return; return;
sp = page_header(__pa(spte)); sp = page_header(__pa(spte));
page = pfn_to_page((*spte & PT64_BASE_ADDR_MASK) >> PAGE_SHIFT); page = pfn_to_page((*spte & PT64_BASE_ADDR_MASK) >> PAGE_SHIFT);
mark_page_accessed(page);
if (is_writeble_pte(*spte)) if (is_writeble_pte(*spte))
kvm_release_page_dirty(page); kvm_release_page_dirty(page);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment