From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752502AbcGSWNE (ORCPT ); Tue, 19 Jul 2016 18:13:04 -0400 Received: from mx5-phx2.redhat.com ([209.132.183.37]:55374 "EHLO mx5-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751952AbcGSWND (ORCPT ); Tue, 19 Jul 2016 18:13:03 -0400 Date: Tue, 19 Jul 2016 18:12:59 -0400 (EDT) From: Paolo Bonzini To: Dave Jones Cc: Linux Kernel , Radim =?utf-8?B?S3LEjW3DocWZ?= , kvm@vger.kernel.org Message-ID: <1996808917.8620990.1468966379654.JavaMail.zimbra@redhat.com> In-Reply-To: <20160719195856.GA31453@fb.com> References: <20160715192729.GA4712@fb.com> <110045299.8101686.1468855610053.JavaMail.zimbra@redhat.com> <20160719195856.GA31453@fb.com> Subject: Re: RFC: silencing kvm unimplemented msr spew. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.4.164.1, 10.5.100.50] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF47 (Linux)/8.0.6_GA_5922) Thread-Topic: silencing kvm unimplemented msr spew. Thread-Index: UlKv1RGAxg0s/FxyyzofDcd90kl0PQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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