From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 3/3] xen: arm: handle thumb mode guest in continuations Date: Thu, 26 Mar 2015 10:06:10 +0000 Message-ID: <1427364370.10784.121.camel@citrix.com> References: <1427297660-26447-3-git-send-email-ian.campbell@citrix.com> <551345AD.5020608@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <551345AD.5020608@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: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2015-03-25 at 23:33 +0000, Julien Grall wrote: > Hi Ian, > > On 25/03/2015 15:34, Ian Campbell wrote: > > PC only needs adjusting by 2, otherwise we rerun the instruction prior > > to the hvc as well. > > I don't understand why you have to adjust PC by 2 for thumb. > The spec encodes the HVC thumb instruction on 32 bits (i.e 4 bytes). I was confused by Encoding T1 in the ARMv7 ARM B9.3.4 which has a 15 at the left most column, but actually it is 15..0,15..0, doh! So we are fine here. I'll drop this patch and pull the regs->pc frobbing in the previous patch back out of the if into the common bit. Ian.