]> git.hungrycats.org Git - linux/commitdiff
KVM: MMU: check for present pdptr shadow page in walk_shadow
authorMarcelo Tosatti <mtosatti@redhat.com>
Mon, 23 Mar 2009 20:51:32 +0000 (17:51 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 2 May 2009 17:57:10 +0000 (10:57 -0700)
(cherry picked from eb64f1e8cd5c3cae912db30a77d062367f7a11a6)

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 <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/mmu.c

index 47c5d3a47f966467ab7a5e96c81b006b8d9fb965..0d2918632b88d522fce53dfba67dc1cc02d95706 100644 (file)
@@ -1159,6 +1159,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;
        }