diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2008-12-09 10:07:22 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:55:46 -0500 |
commit | eb64f1e8cd5c3cae912db30a77d062367f7a11a6 (patch) | |
tree | 9a0f0f9774211b77cf6b5c2e6914e6e88c7b42f1 /arch | |
parent | ca9edaee1aea34ebd9adb48910aba0b3d64b1b22 (diff) |
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 <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/mmu.c | 2 |
1 files changed, 2 insertions, 0 deletions
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, | |||
1269 | if (level == PT32E_ROOT_LEVEL) { | 1269 | if (level == PT32E_ROOT_LEVEL) { |
1270 | shadow_addr = vcpu->arch.mmu.pae_root[(addr >> 30) & 3]; | 1270 | shadow_addr = vcpu->arch.mmu.pae_root[(addr >> 30) & 3]; |
1271 | shadow_addr &= PT64_BASE_ADDR_MASK; | 1271 | shadow_addr &= PT64_BASE_ADDR_MASK; |
1272 | if (!shadow_addr) | ||
1273 | return 1; | ||
1272 | --level; | 1274 | --level; |
1273 | } | 1275 | } |
1274 | 1276 | ||