From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH] KVM: x86: Allow suppressing prints on RDMSR/WRMSR of unhandled MSRs Date: Thu, 9 Nov 2017 16:22:18 +0100 Message-ID: <20171109152217.GC20859@flask> References: <1510144328-2389-1-git-send-email-eyal.moscovici@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, pbonzini@redhat.com, idan.brown@oracle.com, Krish Sadhukhan , Konrad Rzeszutek Wilk To: Eyal Moscovici Return-path: Received: from mx1.redhat.com ([209.132.183.28]:52298 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751219AbdKIPWV (ORCPT ); Thu, 9 Nov 2017 10:22:21 -0500 Content-Disposition: inline In-Reply-To: <1510144328-2389-1-git-send-email-eyal.moscovici@oracle.com> Sender: kvm-owner@vger.kernel.org List-ID: 2017-11-08 14:32+0200, Eyal Moscovici: > Some guests use these unhandled MSRs very frequently. > This cause dmesg to be populated with lots of aggregated messages on > usage of ignored MSRs. As ignore_msrs=true means that the user is > well-aware his guest use ignored MSRs, allow to also disable the > prints on their usage. > > An example of such guest is ESXi which tends to access a lot to MSR > 0x34 (MSR_SMI_COUNT) very frequently. > > In addition, we have observed this to cause unnecessary delays to > guest execution. Such an example is ESXi which experience networking > delays in it's guests (L2 guests) because of these prints (even when > prints are rate-limited). This can easily be reproduced by pinging > from one L2 guest to another. Once in a while, a peak in ping RTT > will be observed. Removing these unhandled MSR prints solves the > issue. > > Because these prints can help diagnose issues with guests, > this commit only suppress them by a module parameter instead of > removing them from code entirely. > > Signed-off-by: Eyal Moscovici > Reviewed-by: Liran Alon > Reviewed-by: Krish Sadhukhan > Signed-off-by: Krish Sadhukhan > Signed-off-by: Konrad Rzeszutek Wilk > --- > arch/x86/kvm/x86.c | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 03869eb..21c0059 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -107,6 +107,9 @@ > static bool __read_mostly ignore_msrs = 0; > module_param(ignore_msrs, bool, S_IRUGO | S_IWUSR); > > +static bool __read_mostly suppress_ignore_msrs_prints = false; > +module_param(suppress_ignore_msrs_prints, bool, S_IRUGO | S_IWUSR); What about calling it 'print_ignored_msrs' and default to true? (I can change that when applying.) Thanks.