lkml.org 
[lkml]   [2019]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 03/17] arm64: kvm: stop treating register x18 as caller save
On Mon, Nov 4, 2019 at 3:51 AM Mark Rutland <mark.rutland@arm.com> wrote:
> > --- a/arch/arm64/kvm/hyp/entry.S
> > +++ b/arch/arm64/kvm/hyp/entry.S
> > @@ -23,6 +23,7 @@
> > .pushsection .hyp.text, "ax"
> >
>
> Could we please add a note here, e.g.
>
> /*
> * We treat x18 as callee-saved as the host may use it as a platform
> * register (e.g. for shadow call stack).
> */
>
> ... as that will avoid anyone trying to optimize this away in future
> after reading the AAPCS.

Sure, that's a good idea.

> > .macro restore_callee_saved_regs ctxt
> > + // We assume \ctxt is not x18-x28
>
> Probably worth s/assume/require/ here.

Agreed, I'll change this in v5.

Sami

\
 
 \ /
  Last update: 2019-11-04 22:45    [W:0.226 / U:1.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site