From: Ian Campbell Subject: Re: [PATCH 3/4] xen/arm: Implement a dummy debug monitor for ARM32 Date: Fri, 2 May 2014 15:18:48 +0100 Message-ID: <1399040328.6043.41.camel@kazak.uk.xensource.com> 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> <53639561.3070303@linaro.org> <1399037211.6043.7.camel@kazak.uk.xensource.com> <5363A022.4000401@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 1WgEIf-0006TF-3i for xen-devel@lists.xenproject.org; Fri, 02 May 2014 14:18:53 +0000 In-Reply-To: <5363A022.4000401@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 Fri, 2014-05-02 at 14:39 +0100, Julien Grall wrote: > On 05/02/2014 02:26 PM, Ian Campbell wrote: > > On Fri, 2014-05-02 at 13:53 +0100, Julien Grall wrote: > >> I don't plan to more spend time to write a correct emulation (i.e > >> context switching) to support HW debug. > > > > I'm not going to ack a patch which causes arm32 to diverge from arm64 in > > this area, especially not when the correct solution (more critical on > > arm64 than arm32) is to properly context switch these registers. > > We don't diverge... The Linux HW debug arm32 implementation doesn't > permit to use RAZ/WI on some registers. > > Currently arm64 HW debug may or may not work but it won't crash the > guest. It's not the case on arm32. So the current Xen already diverge. I think that was a mistake (albeit made under the pressure of a security embargo), we shouldn't diverge further. > As said earlier, the HW debug is not essential. Writing a proper > emulation will take some time and I don't have time for writing and > testing it correctly. This is not about writing any sort of emulation AFAICT. It is about context switching a couple of dozen new registers, of which 80% are multiple instances of the same type of register. The proper solution won't involve any trapping at all. (Maybe we will do lazy context switching at some point, but that's another thing). Ian. > > IHMO, this solution is perfect for Xen 4.4, otherwise Xen 4.4.1 will > breaks support with lots of distribution. > > For Xen 4.5, it's intermediate solution to allow guest working correctly > and people playing their shiny distribution on top of Xen. When someone > will care about HW debug, then we will have to support it correctly. > > Regards, >