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 15:22:27 +0100 Message-ID: <5363AA23.4010901@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> <53639561.3070303@linaro.org> <1399037211.6043.7.camel@kazak.uk.xensource.com> <5363A022.4000401@linaro.org> <1399040328.6043.41.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.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WgEMB-0007HF-5g for xen-devel@lists.xenproject.org; Fri, 02 May 2014 14:22:31 +0000 Received: by mail-ee0-f51.google.com with SMTP id c13so3205392eek.38 for ; Fri, 02 May 2014 07:22:29 -0700 (PDT) In-Reply-To: <1399040328.6043.41.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 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? It's not clear to me how debugging behave with virtualization. -- Julien Grall