From: Ian Campbell Subject: Re: [PATCH v3 10/15] xen: arm: handle traps from 64-bit guests Date: Wed, 24 Jul 2013 18:50:21 +0100 Message-ID: <1374688221.30195.7.camel@hastur.hellion.org.uk> References: <1374234267.13645.54.camel@kazak.uk.xensource.com> <1374234284-6304-10-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: julien.grall@citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2013-07-24 at 12:30 +0100, Stefano Stabellini wrote: > On Fri, 19 Jul 2013, Ian Campbell wrote: > > While there observe that we weren't ever restoring the outer stack frame, even > > for 32-bit guests when running a 64-bit hypervisor! The outer stack frame > > "only" contains most of the SPSR registers for 32-bit... > > > > We can also remove the logic at "return_to_new_vcpu" which detects returns to > > hypervisor mode -- seemingly trying to handle hypervisor threads which aren't > > an thing which we have. The idle VCPUs do not take this path. This simplifies > > the return_to_new_vcpu code, we also split it into 32- and 64-bit VCPU paths. > > > > There is no need to export return_to_hypervisor (now renamed return_from_trap > > on arm64) and likewise stop doing so on 32-bit as well. > > > > Also tweak the case of some system registers for consistency. > > > > Signed-off-by: Ian Campbell > > --- > > v3: actually restore the outer stack frame! Due to this change I have dropped > > the previous Acks. > > It looks OK. However the code refactoring, the naming changes, and the > new code to save the outer stack frame are difficult to follow together. > Maybe separate out the latter? Right, I'll see what I can do. Ian