From: Ian Campbell Subject: Re: [PATCH 2/4] xen/arm: Implement a dummy Performance Monitor for ARM32 Date: Fri, 2 May 2014 12:01:12 +0100 Message-ID: <1399028472.32736.39.camel@kazak.uk.xensource.com> References: <1398379556-1132-1-git-send-email-julien.grall@linaro.org> <1398379556-1132-3-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WgBDR-000273-DK for xen-devel@lists.xenproject.org; Fri, 02 May 2014 11:01:17 +0000 In-Reply-To: <1398379556-1132-3-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Thu, 2014-04-24 at 23:45 +0100, Julien Grall wrote: > XSA-93 (commit 0b18220 "xen/arm: Don't let guess access to Debug and Performance > Monitor registers") disable Performance Monitor. > > When CONFIG_PERF_EVENTS is enabled in the Linux Kernel, regardless the > ID_DFR0 (which tell if Perfomance Monitors Extension is implemented) the > kernel will try to access to PMCR. > > Therefore we tell the guest we have 0 counters. Unfortunately we must always > support PMCCNTR (the cycle counter): we just RAZ/WI for all PM register, > which doesn't crash the kernel at least. How often does this trap occur in practice? Once at start of day? Only if you run perf? Or on every guest context switch? (obviously the last one would be bad...)