All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vipin K Parashar <vipin@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] KVM: PPC: Book3S: Ratelimit copy data failure error messages
Date: Thu, 23 Feb 2017 14:41:51 +0530	[thread overview]
Message-ID: <b45173c5-1e02-80e0-6de0-94df93dfc873@linux.vnet.ibm.com> (raw)
In-Reply-To: <ec2651f4-da09-972d-5a91-b2a69b05b40a@linux.vnet.ibm.com>

v2 for this patch with 'printk_ratelimit' replaced with

'printk_ratelimited' is available at mailing list.


https://patchwork.ozlabs.org/patch/728831/



On Tuesday 14 February 2017 11:50 AM, Vipin K Parashar wrote:
> Forwarded same patch to kvm@vger.kernel.org
>
> and kvm-ppc@vger.kernel.org too.
>
>
> On Tuesday 14 February 2017 12:26 AM, Vipin K Parashar wrote:
>> kvm_ppc_mmu_book3s_32/64 xlat() log "KVM can't copy data" error
>> upon failing to copy user data to kernel space. This floods kernel
>> log once such fails occur in short time period. Ratelimit this
>> error to avoid flooding kernel logs upon copy data failures.
>>
>> Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com>
>> ---
>>   arch/powerpc/kvm/book3s_32_mmu.c | 3 ++-
>>   arch/powerpc/kvm/book3s_64_mmu.c | 3 ++-
>>   2 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/powerpc/kvm/book3s_32_mmu.c 
>> b/arch/powerpc/kvm/book3s_32_mmu.c
>> index a2eb6d3..ca8f960 100644
>> --- a/arch/powerpc/kvm/book3s_32_mmu.c
>> +++ b/arch/powerpc/kvm/book3s_32_mmu.c
>> @@ -224,7 +224,8 @@ static int kvmppc_mmu_book3s_32_xlate_pte(struct 
>> kvm_vcpu *vcpu, gva_t eaddr,
>>       ptem = kvmppc_mmu_book3s_32_get_ptem(sre, eaddr, primary);
>>
>>       if(copy_from_user(pteg, (void __user *)ptegp, sizeof(pteg))) {
>> -        printk(KERN_ERR "KVM: Can't copy data from 0x%lx!\n", ptegp);
>> +        if (printk_ratelimit())
>> +            printk(KERN_ERR "KVM: Can't copy data from 0x%lx!\n", 
>> ptegp);
>>           goto no_page_found;
>>       }
>>
>> diff --git a/arch/powerpc/kvm/book3s_64_mmu.c 
>> b/arch/powerpc/kvm/book3s_64_mmu.c
>> index b9131aa..b420aca 100644
>> --- a/arch/powerpc/kvm/book3s_64_mmu.c
>> +++ b/arch/powerpc/kvm/book3s_64_mmu.c
>> @@ -265,7 +265,8 @@ static int kvmppc_mmu_book3s_64_xlate(struct 
>> kvm_vcpu *vcpu, gva_t eaddr,
>>           goto no_page_found;
>>
>>       if(copy_from_user(pteg, (void __user *)ptegp, sizeof(pteg))) {
>> -        printk(KERN_ERR "KVM can't copy data from 0x%lx!\n", ptegp);
>> +        if (printk_ratelimit())
>> +            printk(KERN_ERR "KVM can't copy data from 0x%lx!\n", 
>> ptegp);
>>           goto no_page_found;
>>       }
>>
>

      reply	other threads:[~2017-02-23  9:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 18:56 [PATCH] KVM: PPC: Book3S: Ratelimit copy data failure error messages Vipin K Parashar
2017-02-14  6:12 ` Vipin K Parashar
2017-02-14  6:24   ` Vipin K Parashar
2017-02-16  5:31   ` Paul Mackerras
2017-02-16  5:31     ` Paul Mackerras
2017-02-16 10:33     ` Vipin K Parashar
2017-02-16 10:45       ` Vipin K Parashar
2017-02-14  6:20 ` Vipin K Parashar
2017-02-23  9:11   ` Vipin K Parashar [this message]

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=b45173c5-1e02-80e0-6de0-94df93dfc873@linux.vnet.ibm.com \
    --to=vipin@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.