summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2009-03-23 17:51:32 -0300
committerGreg Kroah-Hartman <gregkh@suse.de>2009-05-02 10:57:10 -0700
commit3899af53551a9d5f0b316b9b5d1afba2ac47d0a9 (patch)
treecb9d57b4356234a32734ebed0101df0a47a80cf6
parent14e360ee2c711a4ce10d90389773cadea30c54f6 (diff)
downloadlinux-3899af53551a9d5f0b316b9b5d1afba2ac47d0a9.tar.gz
linux-3899af53551a9d5f0b316b9b5d1afba2ac47d0a9.tar.bz2
linux-3899af53551a9d5f0b316b9b5d1afba2ac47d0a9.zip
KVM: MMU: check for present pdptr shadow page in walk_shadow
(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>
-rw-r--r--arch/x86/kvm/mmu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 47c5d3a47f96..0d2918632b88 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -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;
}