summaryrefslogtreecommitdiff
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorIzik Eidus <izike@qumranet.com>2007-10-01 22:14:18 +0200
committerAvi Kivity <avi@qumranet.com>2008-01-30 17:52:50 +0200
commit195aefde9cc2cee38dd54ef92a866721fba4413e (patch)
treee9d7f47e8a462ee193a53cc4c21e5b3c7254956c /drivers/kvm/kvm.h
parent290fc38da8187b53b78dd4d5ab27a20b88ef8b61 (diff)
downloadlwn-195aefde9cc2cee38dd54ef92a866721fba4413e.tar.gz
lwn-195aefde9cc2cee38dd54ef92a866721fba4413e.zip
KVM: Add general accessors to read and write guest memory
Signed-off-by: Izik Eidus <izike@qumranet.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r--drivers/kvm/kvm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 80cfb99fffe0..1965438f18cc 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -559,6 +559,15 @@ extern hpa_t bad_page_address;
gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn);
struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn);
+int kvm_read_guest_page(struct kvm *kvm, gfn_t gfn, void *data, int offset,
+ int len);
+int kvm_read_guest(struct kvm *kvm, gpa_t gpa, void *data, unsigned long len);
+int kvm_write_guest_page(struct kvm *kvm, gfn_t gfn, const void *data,
+ int offset, int len);
+int kvm_write_guest(struct kvm *kvm, gpa_t gpa, const void *data,
+ unsigned long len);
+int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len);
+int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len);
struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn);
void mark_page_dirty(struct kvm *kvm, gfn_t gfn);