From: Ian Campbell Subject: Re: [PATCH 3/4] xen/arm: Implement a dummy debug monitor for ARM32 Date: Fri, 2 May 2014 16:17:14 +0100 Message-ID: <1399043834.18944.7.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> <1399040328.6043.41.camel@kazak.uk.xensource.com> <5363AA23.4010901@linaro.org> 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 1WgFDD-0003MS-I1 for xen-devel@lists.xenproject.org; Fri, 02 May 2014 15:17:19 +0000 In-Reply-To: <5363AA23.4010901@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 15:22 +0100, Julien Grall wrote: > On 05/02/2014 03:18 PM, Ian Campbell wrote: > > 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). > > Are we sure that context switching won't lead to another security issue? Not if we do it right ;-) > It's not clear to me how debugging behave with virtualization. Me neither, yet. Ian.