public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Hollis Blanchard <hollisb@us.ibm.com>
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: Wed, 21 May 2008 21:47:40 -0500	[thread overview]
Message-ID: <4834DECC.8000301@codemonkey.ws> (raw)
In-Reply-To: <43830c96d3d0b1e6411d.1211412175@localhost.localdomain>

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(&current->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(&current->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.

Regards,

Anthony Liguori

> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   


  reply	other threads:[~2008-05-22  2:47 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 [this message]
2008-05-22 14:02     ` Hollis Blanchard
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=4834DECC.8000301@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=avi@qumranet.com \
    --cc=hollisb@us.ibm.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