From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yan, Zheng" Subject: Re: perf uncore & lkvm woes Date: Fri, 17 Aug 2012 09:40:37 +0800 Message-ID: <502DA115.1090907@linux.intel.com> References: <1345101585.31459.112.camel@twins> <502CA368.8050404@linux.intel.com> <502CB1F6.4010204@redhat.com> <502CD444.5020807@redhat.com> <1345115846.29668.16.camel@twins> <502CD891.5030102@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Pekka Enberg , Sasha Levin , Asias He , Cyrill Gorcunov , Ingo Molnar , KVM General , Gleb Natapov To: Avi Kivity , Peter Zijlstra Return-path: Received: from mga03.intel.com ([143.182.124.21]:39151 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753135Ab2HQBkk (ORCPT ); Thu, 16 Aug 2012 21:40:40 -0400 In-Reply-To: <502CD891.5030102@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/16/2012 07:25 PM, Avi Kivity wrote: > On 08/16/2012 02:17 PM, Peter Zijlstra wrote: >> On Thu, 2012-08-16 at 14:06 +0300, Avi Kivity wrote: >> >>> Another option is to deal with them on the host side. That has the >>> benefit of working with non-Linux guests too. >> >> Right, its an insane amount of MSRs though, but it could be done if >> someone takes the time to enumerate them all. > > It's tedious but that's life. > >> >> If KVM then simply ignores all writes and returns all 0 on read we can >> do the same we do for the regular PMU in check_hw_exists(). >> >>> We can just ignore the MSR and print some warning. >> >> If you don't mind printing a warning every time a Linux guest boots ;-) > > We can printk_once() it, or only under debug, now that we have dynamic > debug. We also need to print the warning only if the counter is > enabled. Will Linux configure uncore counters by default (why and which?) > The uncore driver may write some global control MSRs during initialization. I did it because of its simpleness. Peter, do I need to submit a patch disables uncore on virtualized CPU? Regards Yan, Zheng