From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Roedel, Joerg" Subject: Re: [PATCH 1/3] perf, core: Introduce attrs to count in either host or guest mode Date: Tue, 10 May 2011 16:59:02 +0200 Message-ID: <20110510145902.GA30996@amd.com> References: <1305038132-5080-1-git-send-email-joerg.roedel@amd.com> <1305038132-5080-2-git-send-email-joerg.roedel@amd.com> <1305038746.2914.94.camel@laptop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" To: Peter Zijlstra Return-path: Content-Disposition: inline In-Reply-To: <1305038746.2914.94.camel@laptop> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Tue, May 10, 2011 at 10:45:46AM -0400, Peter Zijlstra wrote: > On Tue, 2011-05-10 at 16:35 +0200, Joerg Roedel wrote: > > + /* Can't exclude counting in guest and in host mode */ > > + if (attr.exclude_host && attr.exclude_guest) > > + return -EINVAL; > > Why not? By definition the counter won't count at all. The hardware just ignores the bits if they are both set. My rationale here was that it does not makes sense to setup a counter and exclude guest and host mode. Joerg