|
Message-ID: <CABCJKudSBjOkPFZ-DBFRNqQ=kx5u1Q8W6MY0VGoo=5BTakP2dg@mail.gmail.com> Date: Tue, 22 Oct 2019 14:45:45 -0700 From: Sami Tolvanen <samitolvanen@...gle.com> To: Marc Zyngier <maz@...nel.org> Cc: Will Deacon <will@...nel.org>, Catalin Marinas <catalin.marinas@....com>, Steven Rostedt <rostedt@...dmis.org>, Ard Biesheuvel <ard.biesheuvel@...aro.org>, Mark Rutland <mark.rutland@....com>, Kees Cook <keescook@...omium.org>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, Nick Desaulniers <ndesaulniers@...gle.com>, LKML <linux-kernel@...r.kernel.org>, clang-built-linux <clang-built-linux@...glegroups.com>, Laura Abbott <labbott@...hat.com>, Dave Martin <Dave.Martin@....com>, linux-arm-kernel <linux-arm-kernel@...ts.infradead.org> Subject: Re: [PATCH 03/18] arm64: kvm: stop treating register x18 as caller save On Tue, Oct 22, 2019 at 10:22 AM Marc Zyngier <maz@...nel.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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.