From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BACA7C43612 for ; Tue, 8 Jan 2019 11:51:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 84E2C2087F for ; Tue, 8 Jan 2019 11:51:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CfW5x1yD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84E2C2087F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=w/n8pE++SJxydRhkUDoePFavzjV2tCMNeg307bH2Hg4=; b=CfW5x1yD6jIxuD 5H/ODHu6XnhrhpXJUjWxqymnmDeDhRdauZ3lhhLtnwMlM7uNqveAtgtS02/60s5YM+KU0V/hD1DlX kwQondlK9rrktyI2W7jd8BncCshRYq7W6RyOhLrLxhwj2vsvJBljjPo1ghaYiJzjG5JSb7wu6qSDm qJ3L8T6ojWF1LCoL+fzKCY7bK7qFTKGSHmVh/dO6QqbcXKnM8fc4VREWUh/OyGArWybybFltJHwd0 2MqySfy42JTF/eSBwx3CjmxYpmpSIivUZdG2rkZ0o9E76IkiKZSULr2SqijjDtnL3/UP2i/t9x+4H vnOYxRhPY1T60sY4AePw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggpui-0000iM-I1; Tue, 08 Jan 2019 11:51:20 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggpue-0000hq-UA for linux-arm-kernel@lists.infradead.org; Tue, 08 Jan 2019 11:51:18 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3D3221596; Tue, 8 Jan 2019 03:51:14 -0800 (PST) Received: from big-swifty.misterjones.org (big-swifty.cambridge.arm.com [10.1.34.202]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2B55C3F70D; Tue, 8 Jan 2019 03:51:04 -0800 (PST) Date: Tue, 08 Jan 2019 11:50:59 +0000 Message-ID: <868szvbc64.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Andrew Murray Subject: Re: [PATCH v8 4/5] arm64: arm_pmu: Add support for exclude_host/exclude_guest attributes In-Reply-To: <20190108112512.GA56789@e119886-lin.cambridge.arm.com> References: <1544610573-28446-1-git-send-email-andrew.murray@arm.com> <1544610573-28446-5-git-send-email-andrew.murray@arm.com> <20181218120226.GC25383@e113682-lin.lund.arm.com> <20190104153205.GA31479@edgewater-inn.cambridge.arm.com> <20190108101843.GH10769@e113682-lin.lund.arm.com> <20190108112512.GA56789@e119886-lin.cambridge.arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190108_035116_984851_9A1F5D5E X-CRM114-Status: GOOD ( 15.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Julien Thierry , Catalin Marinas , joro@8bytes.org, Suzuki K Poulose , Will Deacon , Christoffer Dall , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 08 Jan 2019 11:25:13 +0000, Andrew Murray wrote: Hi Andrew, > My only doubt about this is as follows. If, on a KVM host you run this: > > perf stat -e cycles:H lkvm run ... > > then on the VHE host the cycles reported represents the entire non-guest cycles > associated with running the guest. > > On a !VHE, the cycles reported exclude EL2 (with or without this patch) and > thus you don't get a representation of all the non-guest cycles associated with > the guest. However without this patch you could at least still run: > > perf stat -e cycles:H -e cycles:h lkvm run ... > > and then add the two cycle counts together to get something comparative with > the VHE host. > > If the above patch represents the desired semantics, then perhaps we must count > both EL1 and *EL2* for !exclude_kernel on !VHE. In fact I think we should do > this anyway and remove a little complexity from armv8pmu_set_event_filter. > Thoughts? I'm not sure we should hide the architectural differences between VHE and !VHE. If you're trying to measure what is happening at in the hypervisor, you can't reason about it while ignoring the dual nature of !VHE. Thanks, M. -- Jazz is not dead, it just smell funny. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel