From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 2/3] xen: arm: correctly handle continuations for 64-bit guests Date: Wed, 25 Mar 2015 15:50:06 +0000 Message-ID: <1427298606.10784.89.camel@citrix.com> References: <1427297660-26447-2-git-send-email-ian.campbell@citrix.com> <5512D741.7000105@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5512D741.7000105@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: Andrew Cooper 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 Wed, 2015-03-25 at 15:41 +0000, Andrew Cooper wrote: > On 25/03/15 15:34, Ian Campbell wrote: > > The 64-bit ABI is different to 32-bit: > > > > - uses x16 as the op register rather than r12. > > - arguments in x0..x5 and not r0..r5. Using rN here potentially > > truncates. > > - return value goes in x0, not r0. > > > > Hypercalls can only be made directly from kernel space, so checking > > the domain's size is sufficient. > > > > The update of regs->pc is duplicated in both halves because the 32-bit > > case is going to need fixing to handle Thumb mode (next patch). > > > > Spotted due to spurious -EFAULT when destroying a domain, due to the > > hypercall's pointer argument being truncated. I'm unclear why I am > > only seeing this now. > > > > Signed-off-by: Ian Campbell > > Almost certainly 15e0aac6fe76be6a710a8e6d3da610d437903266 which changed > XEN_DOMCTL_destroydomain to use continuations rather than repeated > hypercalls. That sounds like why domaindestroy now exhibits it, but not why it hasn't been plaguing us on different hypercalls for ever. I suppose we don't actually hit preempt very often in practice. Ian.