Skip to content
Commit 22d95b12 authored by Avi Kivity's avatar Avi Kivity Committed by Linus Torvalds
Browse files

KVM: MMU: Fix rare oops on guest context switch



A guest context switch to an uncached cr3 can require allocation of
shadow pages, but we only recycle shadow pages in kvm_mmu_page_fault().

Move shadow page recycling to mmu_topup_memory_caches(), which is called
from both the page fault handler and from guest cr3 reload.

Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 44e3ff32
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment