Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b733bfb524af69612f85c36a511f0109c5e3fe8d
Commit:     b733bfb524af69612f85c36a511f0109c5e3fe8d
Parent:     3067714cf59bd4a6dbf788b709485bc62c1ff845
Author:     Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Sun Oct 28 18:52:05 2007 +0200
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 17:52:57 2008 +0200

    KVM: MMU: Topup the mmu memory preallocation caches before emulating an insn
    
    Emulation may cause a shadow pte to be instantiated, which requires
    memory resources.  Make sure the caches are filled to avoid an oops.
    
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/mmu.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index ace3cb8..9be54a5 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -1362,6 +1362,10 @@ int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t cr2, 
u32 error_code)
                goto out;
        }
 
+       r = mmu_topup_memory_caches(vcpu);
+       if (r)
+               goto out;
+
        er = emulate_instruction(vcpu, vcpu->run, cr2, error_code, 0);
        mutex_unlock(&vcpu->kvm->lock);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to