From da4a00f002239f72b0d7d0eeaa3b60100e2b1438 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Fri, 5 Jan 2007 16:36:44 -0800 Subject: [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 Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/kvm/mmu.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/kvm/mmu.c') diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index ceae25bfd4b..bce7eb21f73 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -956,6 +956,15 @@ int kvm_mmu_reset_context(struct kvm_vcpu *vcpu) return init_kvm_mmu(vcpu); } +void kvm_mmu_pre_write(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes) +{ + pgprintk("%s: gpa %llx bytes %d\n", __FUNCTION__, gpa, bytes); +} + +void kvm_mmu_post_write(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes) +{ +} + static void free_mmu_pages(struct kvm_vcpu *vcpu) { while (!list_empty(&vcpu->free_pages)) { -- cgit