From: Hollis Blanchard <hollisb@us.ibm.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: avi@qumranet.com, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 5 of 5] [kvm powerpc] Report bad GFNs
Date: Thu, 22 May 2008 09:02:52 -0500 [thread overview]
Message-ID: <200805220902.53093.hollisb@us.ibm.com> (raw)
In-Reply-To: <4834DECC.8000301@codemonkey.ws>
On Wednesday 21 May 2008 21:47:40 Anthony Liguori wrote:
> Hollis Blanchard wrote:
> > This code shouldn't be hit anyways, but when it is, it's useful to have a
> > little more information about the failure.
> >
> > Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
> >
> > diff --git a/arch/powerpc/kvm/44x_tlb.c b/arch/powerpc/kvm/44x_tlb.c
> > --- a/arch/powerpc/kvm/44x_tlb.c
> > +++ b/arch/powerpc/kvm/44x_tlb.c
> > @@ -145,7 +145,7 @@ void kvmppc_mmu_map(struct kvm_vcpu *vcp
> > down_read(¤t->mm->mmap_sem);
> > new_page = gfn_to_page(vcpu->kvm, gfn);
> > if (is_error_page(new_page)) {
> > - printk(KERN_ERR "Couldn't get guest page!\n");
> > + printk(KERN_ERR "Couldn't get guest page for gfn %lx!\n", gfn);
> > kvm_release_page_clean(new_page);
> > up_read(¤t->mm->mmap_sem);
> > return;
> >
>
> FWIW, you should probably rate limit this sort of thing if this is what
> would get triggered if the guest tried to program the tlb with an
> invalid gfn.
That was my initial thought as well, but in general, kvmppc_mmu_map() is only
called if a TLB entry is "safe" -- meaning kvm_is_visible_gfn(kvm, gfn) was
true. So in the absence of bugs elsewhere, this should never happen... but we
know how that goes. ;)
Anyways, that's why I'm not worried about rate limiting here.
--
Hollis Blanchard
IBM Linux Technology Center
next prev parent reply other threads:[~2008-05-22 14:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 23:22 [PATCH 0 of 5] PowerPC KVM fixes for 2.6.26 Hollis Blanchard
2008-05-21 23:22 ` [PATCH 1 of 5] KVM: ppc: Remove duplicate function Hollis Blanchard
2008-05-21 23:22 ` [PATCH 2 of 5] KVM: ppc: add lwzx/stwz emulation Hollis Blanchard
2008-05-21 23:22 ` [PATCH 3 of 5] KVM: ppc: Remove unmatched kunmap() call Hollis Blanchard
2008-05-21 23:22 ` [PATCH 4 of 5] KVM: ppc: Use a read lock around MMU operations, and release it on error Hollis Blanchard
2008-05-21 23:22 ` [PATCH 5 of 5] [kvm powerpc] Report bad GFNs Hollis Blanchard
2008-05-22 2:47 ` Anthony Liguori
2008-05-22 14:02 ` Hollis Blanchard [this message]
2008-05-25 10:35 ` [PATCH 0 of 5] PowerPC KVM fixes for 2.6.26 Avi Kivity
2008-05-27 15:39 ` Hollis Blanchard
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=200805220902.53093.hollisb@us.ibm.com \
--to=hollisb@us.ibm.com \
--cc=anthony@codemonkey.ws \
--cc=avi@qumranet.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
/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