linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Dave Jones <dsj@fb.com>
Cc: "Linux Kernel" <linux-kernel@vger.kernel.org>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: RFC: silencing kvm unimplemented msr spew.
Date: Tue, 19 Jul 2016 18:12:59 -0400 (EDT)	[thread overview]
Message-ID: <1996808917.8620990.1468966379654.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20160719195856.GA31453@fb.com>

> On Mon, Jul 18, 2016 at 11:26:50AM -0400, Paolo Bonzini wrote:
> > Indeed, ignore_msrs does a completely different thing.  It suppresses
> > general protection faults in the guest.  It is related to behavior that
> > KVM injects in the guests, not to the things that KVM spews in the host.
> > 
> > What about just downgrading the printf to KERN_DEBUG?  You could simply
> > change from vcpu_unimpl to vcpu_debug, but it's probably a good idea to
> > keep the ratelimiting; there's a kvm_pr_unimpl, so maybe add a new
> > kvm_pr_debug and vcpu_pr_debug.
>
> Hm, we've certainly got a lot of options in terms of print primitives these
> days.
> 
> We could just do this...
> 
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index 1c9c973a7dd9..a80b9a0a5f8c 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -423,7 +423,7 @@ struct kvm {
>  #define kvm_debug(fmt, ...) \
>         pr_debug("kvm [%i]: " fmt, task_pid_nr(current), ## __VA_ARGS__)
>  #define kvm_pr_unimpl(fmt, ...) \
> -       pr_err_ratelimited("kvm [%i]: " fmt, \
> +       pr_debug_ratelimited("kvm [%i]: " fmt, \
>                            task_tgid_nr(current), ## __VA_ARGS__)
>  
>  /* The guest did something we don't support. */
> 
> Which I think would have the desired effect, and also gets us dynamic debug
> support for free.

There are some "unimplemented" messages that would be affected and really
should be errors (or even WARNs), but I guess this patch is okay.  Can you
submit it with SoB and all that?

Thanks,

Paolo

      parent reply	other threads:[~2016-07-19 22:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15 19:27 RFC: silencing kvm unimplemented msr spew Dave Jones
2016-07-18 15:26 ` Paolo Bonzini
2016-07-19 19:58   ` Dave Jones
2016-07-19 20:24     ` Bandan Das
2016-07-21 20:24       ` Dave Jones
2016-07-21 20:41         ` Bandan Das
2016-07-22  8:48         ` Paolo Bonzini
2016-07-22 16:04           ` Bandan Das
2016-07-22 16:20             ` Paolo Bonzini
2016-07-22 16:37               ` Bandan Das
2016-07-19 22:12     ` Paolo Bonzini [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=1996808917.8620990.1468966379654.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=dsj@fb.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rkrcmar@redhat.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;
as well as URLs for NNTP newsgroup(s).