lkml.org 
[lkml]   [2019]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 03/18] arm64: kvm: stop treating register x18 as caller save
On Tue, Oct 22, 2019 at 10:22 AM Marc Zyngier <maz@kernel.org> wrote:
> > .macro save_callee_saved_regs ctxt
> > + str x18, [\ctxt, #CPU_XREG_OFFSET(18)]
> > stp x19, x20, [\ctxt, #CPU_XREG_OFFSET(19)]
> > stp x21, x22, [\ctxt, #CPU_XREG_OFFSET(21)]
> > stp x23, x24, [\ctxt, #CPU_XREG_OFFSET(23)]
> > @@ -38,6 +39,7 @@
> > ldp x25, x26, [\ctxt, #CPU_XREG_OFFSET(25)]
> > ldp x27, x28, [\ctxt, #CPU_XREG_OFFSET(27)]
> > ldp x29, lr, [\ctxt, #CPU_XREG_OFFSET(29)]
> > + ldr x18, [\ctxt, #CPU_XREG_OFFSET(18)]
>
> There is now an assumption that ctxt is x18 (otherwise why would it be
> out of order?). Please add a comment to that effect.

> > - // Restore guest regs x19-x29, lr
> > + // Restore guest regs x18-x29, lr
> > restore_callee_saved_regs x18
>
> Or you could elect another register such as x29 as the base, and keep
> the above in a reasonable order.

I'm fine with either option. Ard, any thoughts?

Sami

\
 
 \ /
  Last update: 2019-10-22 23:47    [W:0.264 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site