repository: /home/avi/kvm/linux-2.6
branch: master
commit b95061aec006bc4c44e4b244e4ec15c009ab880a
Author: Avi Kivity <[EMAIL PROTECTED]>
Date:   Sun Oct 28 18:52:05 2007 +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]>

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);
 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to