From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 04/19] xen: arm: provide and use a handle_raz_wi helper Date: Thu, 16 Apr 2015 17:35:39 +0100 Message-ID: <1429202139.25195.183.camel@citrix.com> References: <1427796446.2115.34.camel@citrix.com> <1427796462-24376-4-git-send-email-ian.campbell@citrix.com> <551D5CC0.9030709@citrix.com> <1427988686.4037.103.camel@citrix.com> <551D6407.70203@citrix.com> <1427989822.4037.105.camel@citrix.com> <1427990468.4037.107.camel@citrix.com> <1427991596.4037.109.camel@citrix.com> <551E89F7.2040605@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <551E89F7.2040605@citrix.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: Julien Grall Cc: julien.grall@linaro.org, tim@xen.org, stefano.stabellini@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 2015-04-03 at 14:39 +0200, Julien Grall wrote: > > On 02/04/2015 18:19, Ian Campbell wrote: > > On Thu, 2015-04-02 at 17:01 +0100, Ian Campbell wrote: > >> On Thu, 2015-04-02 at 16:50 +0100, Ian Campbell wrote: > >> > >>> Writing to the bottom half (e.g. w0) of a register implicitly clears the > >>> top half, IIRC, so I think a kernel is unlikely to want to do this, even > >>> if it could (which I'm not quite convinced of). > >> > >> That said, I'll see if I can make something work with the handle_* > >> taking the reg number instead of a pointer and calling select_user_reg > >> in each. > > > > Actually don't even need that, I think the following does what is > > needed. I'm not 100% convinced it is needed though, but it's simple > > enough, and I can't find anything in the ARM ARM right now which rules > > out what you are suggesting, even if it is unlikely. > > The paragraph "Pseudocode description of registers in AArch64 state" in > section B1.2.1 (ARMv8 DDI0487 A.d) confirms your previous mail. I.e > "writing to the bottom half (e.g. w0) of a register implicitly clears > the top half". > > I think it may be worth to mention the paragraph somewhere in the patch. Yes, I shall, in the commit log most likely. Ian.