* KVM: MMU: check for present pdptr shadow page in walk_shadow
@ 2008-12-09 15:07 Marcelo Tosatti
2008-12-10 9:06 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2008-12-09 15:07 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm-devel
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>
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 863baf7..641c078 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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: KVM: MMU: check for present pdptr shadow page in walk_shadow
2008-12-09 15:07 KVM: MMU: check for present pdptr shadow page in walk_shadow Marcelo Tosatti
@ 2008-12-10 9:06 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-12-10 9:06 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: kvm-devel
Marcelo Tosatti wrote:
> 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.
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-10 9:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-09 15:07 KVM: MMU: check for present pdptr shadow page in walk_shadow Marcelo Tosatti
2008-12-10 9:06 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).