From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 3/4] xen/arm: Implement a dummy debug monitor for ARM32 Date: Fri, 02 May 2014 13:53:53 +0100 Message-ID: <53639561.3070303@linaro.org> References: <1398379556-1132-1-git-send-email-julien.grall@linaro.org> <1398379556-1132-4-git-send-email-julien.grall@linaro.org> <1399028953.32736.42.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WgCyT-0002Y8-2D for xen-devel@lists.xenproject.org; Fri, 02 May 2014 12:53:57 +0000 Received: by mail-ee0-f42.google.com with SMTP id d17so3159749eek.1 for ; Fri, 02 May 2014 05:53:55 -0700 (PDT) In-Reply-To: <1399028953.32736.42.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On 05/02/2014 12:09 PM, Ian Campbell wrote: > 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 >> Monitors registers") disable Debug Registers access. >> >> When CONFIG_PERF_EVENTS is enabled in the Linux Kernel, it will try to >> initialize the debug monitors. If an error occured Linux won't use this >> feature. >> >> The implementation made Xen expose a minimal set of registers which let think >> the guest (i.e.) thinks HW debug won't work. > > Why only for arm32? Because, if I'm not mistaken, you've already implemented a dummy HW debug for arm64 in commit 0b182202 "xen/arm: Don't let guess access to Debug and Performance Monitor registers". > I think arm64 makes more use than arm32 (unconditionally touches > MDSCR_EL1 on the ctx switch path). > > I think we should be considering allow the guest to access these and > context switching them instead. Disabling HW breakpoint don't disable debug. Linux will only use software breakpoing (which is of course a bit slower). I wrote this series to allow Distribution kernel (such as Linaro Ubuntu kernel) boots correctly on Xen 4.4 and onwards. I don't plan to more spend time to write a correct emulation (i.e context switching) to support HW debug. Regards, -- Julien Grall