From a436036baf331703b4d2c8e8a45f02c597bf6913 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Fri, 5 Jan 2007 16:36:45 -0800 Subject: [PATCH] KVM: MMU: If emulating an instruction fails, try unprotecting the page A page table may have been recycled into a regular page, and so any instruction can be executed on it. Unprotect the page and let the cpu do its thing. Signed-off-by: Avi Kivity Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/kvm/kvm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/kvm/kvm.h') diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index b7068ecd7765..34c43bb4d348 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h @@ -450,6 +450,7 @@ 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); +int kvm_mmu_unprotect_page_virt(struct kvm_vcpu *vcpu, gva_t gva); static inline struct page *_gfn_to_page(struct kvm *kvm, gfn_t gfn) { -- cgit v1.2.3