From: Marcelo Tosatti Date: Tue, 9 Dec 2008 15:07:22 +0000 (+0100) Subject: KVM: MMU: check for present pdptr shadow page in walk_shadow X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eb64f1e8cd5c3cae912db30a77d062367f7a11a6;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git KVM: MMU: check for present pdptr shadow page in walk_shadow walk_shadow assumes the caller verified validity of the pdptr pointer in question, which is not the case for the invlpg handler. Fixes oops during Solaris 10 install. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 863baf70506e..641c07844e6e 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -1269,6 +1269,8 @@ static int walk_shadow(struct kvm_shadow_walk *walker, if (level == PT32E_ROOT_LEVEL) { shadow_addr = vcpu->arch.mmu.pae_root[(addr >> 30) & 3]; shadow_addr &= PT64_BASE_ADDR_MASK; + if (!shadow_addr) + return 1; --level; }