From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: Questing regarding KVM Guest PMU Date: Sun, 8 Apr 2012 18:27:03 +0300 Message-ID: <20120408152703.GS11918@redhat.com> References: <20120405123739.GI11204@redhat.com> <4F7D94B3.8090300@redhat.com> <20120405132653.GJ11204@redhat.com> <4F7D9E10.6070703@redhat.com> <20120405134857.GK11204@redhat.com> <20120405135754.GL11204@redhat.com> <4F7DAE70.4070508@redhat.com> <20120405144151.GN11204@redhat.com> <20120406065050.GA11633@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , kvm@vger.kernel.org To: shashank rachamalla Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42283 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755743Ab2DHP1F (ORCPT ); Sun, 8 Apr 2012 11:27:05 -0400 Content-Disposition: inline In-Reply-To: <20120406065050.GA11633@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Apr 06, 2012 at 09:50:50AM +0300, Gleb Natapov wrote: > On Fri, Apr 06, 2012 at 10:43:17AM +0530, shashank rachamalla wrote: > > On Thu, Apr 5, 2012 at 8:11 PM, Gleb Natapov wrote: > > > On Thu, Apr 05, 2012 at 05:38:40PM +0300, Avi Kivity wrote: > > >> On 04/05/2012 04:57 PM, Gleb Natapov wrote: > > >> > > > > > >> > > May be it used NMI based profiling. We should ask oprofile developers. > > >> > > As I said I am almost sure my inability to run it on a host is probably > > >> > > PEBKAC, although I ran the same script exactly on the host and the > > >> > > guest (the script is from the first email of this thread) > > >> > > > > >> > After upgrading the kernel to latest git from whatever it was there the > > >> > same script works and counts CPU_CLK_UNHALT events. > > >> > > > >> > > >> This is even while it violates the Intel guidelines? > > >> > > > Yes, but who says the result is correct :) It seems that we handle > > > global ctrl msr wrong. That is counter can be enabled either in global > > > ctrl or in eventsel. Trying to confirm that. > > > > > if that becomes true then will global ctrl msr have any significance ? > When it is in use yes. > I was wrong. We do handle global ctrl msr correctly, I just ran my test incorrectly. If I disable global ctrl on all cpus (for i in `seq 0 15`; do wrmsr -p $i 0x38f 0; done) oprofile stops working. -- Gleb.