From: Hollis Blanchard <hollisb@us.ibm.com>
To: Avi Kivity <avi@qumranet.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
"Richard W.M. Jones" <rjones@redhat.com>,
kvm-devel <kvm@vger.kernel.org>,
"Zhang, Xiantao" <xiantao.zhang@intel.com>
Subject: Re: KVM: MMU: nuke shadowed pgtable pages and pte's on memslot destruction
Date: Thu, 10 Jul 2008 13:58:24 -0500 [thread overview]
Message-ID: <1215716304.16858.64.camel@localhost.localdomain> (raw)
In-Reply-To: <48761FCB.4080307@qumranet.com>
On Thu, 2008-07-10 at 17:42 +0300, Avi Kivity wrote:
>
> > During RH6.2 graphical installation the following oops is triggered:
> >
> > BUG: unable to handle kernel NULL pointer dereference at
> 0000000000000000
> > IP: [<ffffffffa00bf172>] :kvm:gfn_to_rmap+0x3e/0x61
> > Pid: 4559, comm: qemu-system-x86 Not tainted
> >
> > The problem is that KVM allows shadow pagetable entries that
> > point to a removed memslot to exist. In this case the cirrus vram
> > mapping was removed, and the NULL dereference happened during
> > kvm_set_memory_alias()'s zap_all_pages().
> >
> > So nuke all shadowed pages before memslot removal.
> >
> > Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> >
> >
> > diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
> > index a4cf4a2..76259da 100644
> > --- a/arch/ia64/kvm/kvm-ia64.c
> > +++ b/arch/ia64/kvm/kvm-ia64.c
> > @@ -1455,6 +1455,10 @@ int kvm_arch_set_memory_region(struct kvm
> *kvm,
> > return 0;
> > }
> >
> > +int kvm_arch_destroy_memory_region(struct kvm *kvm, int slot)
> > +{
> > + return 0;
> > +}
> >
> >
>
> This (and its friends) ought to be static inlines.
>
> On the other hand, don't the other arches have to flush their tlbs?
> Xiantao/Hollis? So maybe this function needs to be renamed
> kvm_flush_shadow() and implemented across the board.
Agreed, I think that's the right approach.
--
Hollis Blanchard
IBM Linux Technology Center
next prev parent reply other threads:[~2008-07-10 18:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-04 1:06 KVM: MMU: nuke shadowed pgtable pages and pte's on memslot destruction Marcelo Tosatti
2008-07-05 17:25 ` Avi Kivity
2008-07-05 19:23 ` Marcelo Tosatti
2008-07-05 21:15 ` Avi Kivity
2008-07-07 17:31 ` Marcelo Tosatti
2008-07-07 19:58 ` Marcelo Tosatti
2008-07-10 14:42 ` Avi Kivity
2008-07-10 18:58 ` Hollis Blanchard [this message]
2008-07-10 23:49 ` Marcelo Tosatti
2008-07-11 14:48 ` Avi Kivity
2008-07-21 21:03 ` Hollis Blanchard
2008-07-21 21:34 ` Marcelo Tosatti
2008-07-21 22:22 ` Hollis Blanchard
2008-07-22 5:18 ` Avi Kivity
2008-07-10 23:54 ` Marcelo Tosatti
2008-07-11 15:09 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1215716304.16858.64.camel@localhost.localdomain \
--to=hollisb@us.ibm.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=rjones@redhat.com \
--cc=xiantao.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox