summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kvm_page_track.h
diff options
context:
space:
mode:
authorXiao Guangrong <guangrong.xiao@linux.intel.com>2016-02-24 17:51:10 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2016-03-03 14:36:21 +0100
commitf29d4d7810d7fd61442371cd68957e1d37ed79bb (patch)
tree2db4d5b891ce6fcab4e9eb630cbf684b593d3105 /arch/x86/include/asm/kvm_page_track.h
parent21ebbedaddf25a35a70fedc001ba7e5f5b9129bc (diff)
downloadblackbird-obmc-linux-f29d4d7810d7fd61442371cd68957e1d37ed79bb.tar.gz
blackbird-obmc-linux-f29d4d7810d7fd61442371cd68957e1d37ed79bb.zip
KVM: page track: introduce kvm_slot_page_track_{add,remove}_page
These two functions are the user APIs: - kvm_slot_page_track_add_page(): add the page to the tracking pool after that later specified access on that page will be tracked - kvm_slot_page_track_remove_page(): remove the page from the tracking pool, the specified access on the page is not tracked after the last user is gone Both of these are called under the protection both of mmu-lock and kvm->srcu or kvm->slots_lock Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_page_track.h')
-rw-r--r--arch/x86/include/asm/kvm_page_track.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_page_track.h b/arch/x86/include/asm/kvm_page_track.h
index 5520040682d1..e363e3040ba4 100644
--- a/arch/x86/include/asm/kvm_page_track.h
+++ b/arch/x86/include/asm/kvm_page_track.h
@@ -10,4 +10,11 @@ void kvm_page_track_free_memslot(struct kvm_memory_slot *free,
struct kvm_memory_slot *dont);
int kvm_page_track_create_memslot(struct kvm_memory_slot *slot,
unsigned long npages);
+
+void kvm_slot_page_track_add_page(struct kvm *kvm,
+ struct kvm_memory_slot *slot, gfn_t gfn,
+ enum kvm_page_track_mode mode);
+void kvm_slot_page_track_remove_page(struct kvm *kvm,
+ struct kvm_memory_slot *slot, gfn_t gfn,
+ enum kvm_page_track_mode mode);
#endif
OpenPOWER on IntegriCloud