diff options
author | Avi Kivity <avi@qumranet.com> | 2007-01-06 01:36:44 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2007-01-06 08:55:25 +0100 |
commit | da4a00f002239f72b0d7d0eeaa3b60100e2b1438 (patch) | |
tree | 7c7e72ea1fd48025c029429b413e127a3a580c10 /drivers/kvm/kvm.h | |
parent | [PATCH] KVM: MMU: Let the walker extract the target page gfn from the pte (diff) | |
download | linux-da4a00f002239f72b0d7d0eeaa3b60100e2b1438.tar.xz linux-da4a00f002239f72b0d7d0eeaa3b60100e2b1438.zip |
[PATCH] KVM: MMU: Support emulated writes into RAM
As the mmu write protects guest page table, we emulate those writes. Since
they are not mmio, there is no need to go to userspace to perform them.
So, perform the writes in the kernel if possible, and notify the mmu about
them so it can take the approriate action.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r-- | drivers/kvm/kvm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 58b9deb0bc0e..b7068ecd7765 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h @@ -448,6 +448,9 @@ int kvm_write_guest(struct kvm_vcpu *vcpu, unsigned long segment_base(u16 selector); +void kvm_mmu_pre_write(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes); +void kvm_mmu_post_write(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes); + static inline struct page *_gfn_to_page(struct kvm *kvm, gfn_t gfn) { struct kvm_memory_slot *slot = gfn_to_memslot(kvm, gfn); |