projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3067714
)
KVM: MMU: Topup the mmu memory preallocation caches before emulating an insn
author
Avi Kivity
<avi@qumranet.com>
Sun, 28 Oct 2007 16:52:05 +0000
(18:52 +0200)
committer
Avi Kivity
<avi@qumranet.com>
Wed, 30 Jan 2008 15:52:57 +0000
(17:52 +0200)
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 <avi@qumranet.com>
drivers/kvm/mmu.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/kvm/mmu.c
b/drivers/kvm/mmu.c
index ace3cb86214b2979aaad93b580f6b20088c24154..9be54a5e858e9e58986a4dd7423aa9533f1a8e58 100644
(file)
--- 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);