[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMj1kXE5bC-QgGWqhAtuRT5fDbBUgjkRyjGSwsiQcSgA-KuaYg@mail.gmail.com>
Date: Fri, 26 Jan 2024 00:24:35 +0100
From: Ard Biesheuvel <ardb@...nel.org>
To: Kevin Loughlin <kevinloughlin@...gle.com>
Cc: Ard Biesheuvel <ardb+git@...gle.com>, linux-kernel@...r.kernel.org,
Tom Lendacky <thomas.lendacky@....com>, Dionna Glaze <dionnaglaze@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, Andy Lutomirski <luto@...nel.org>,
Arnd Bergmann <arnd@...db.de>, Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
Brian Gerst <brgerst@...il.com>, linux-arch@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH v2 16/17] x86/sev: Drop inline asm LEA instructions for
RIP-relative references
On Thu, 25 Jan 2024 at 21:46, Kevin Loughlin <kevinloughlin@...gle.com> wrote:
>
> On Thu, Jan 25, 2024 at 3:33 AM Ard Biesheuvel <ardb+git@...gle.com> wrote:
> >
> > The SEV code that may run early is now built with -fPIC and so there is
> > no longer a need for explicit RIP-relative references in inline asm,
> > given that is what the compiler will emit as well.
> >
> > Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
> > ---
> > arch/x86/mm/mem_encrypt_identity.c | 37 +++-----------------
> > 1 file changed, 5 insertions(+), 32 deletions(-)
>
> snp_cpuid_get_table() in arch/x86/kernel/sev-shared.c (a helper
> function to provide the same inline assembly pattern for RIP-relative
> references) would also no longer be needed, as all calls to it would
> now be made in position-independent code. We can therefore eliminate
> the function as part of this commit.
Yes that would be another nice cleanup.
Powered by blists - more mailing lists