[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250508110800.GBaByQkJwmZlihk6Xp@fat_crate.local>
Date: Thu, 8 May 2025 13:08:00 +0200
From: Borislav Petkov <bp@...en8.de>
To: Ard Biesheuvel <ardb@...nel.org>
Cc: Ard Biesheuvel <ardb+git@...gle.com>, linux-kernel@...r.kernel.org,
linux-efi@...r.kernel.org, x86@...nel.org,
Ingo Molnar <mingo@...nel.org>,
Dionna Amalie Glaze <dionnaglaze@...gle.com>,
Kevin Loughlin <kevinloughlin@...gle.com>,
Tom Lendacky <thomas.lendacky@....com>
Subject: Re: [RFT PATCH v2 05/23] x86/sev: Move instruction decoder into
separate source file
On Wed, May 07, 2025 at 01:49:19PM +0200, Ard Biesheuvel wrote:
> Sure, I can add some more prose. I'll add something along the lines of
>
> "Some of the SEV code that is shared between the decompressor and the
> kernel proper runs very early in the latter, and therefore needs to be
> built in a special way. This does not apply to all of that shared
> code, though - some is used both by the decompressor, and by the
> kernel proper but at a much later stage. That code can be built as
> ordinary, position dependent code with instrumentations enabled etc
> etc.
>
> The #VC handling machinery and the associated instruction decoder are
> conceptually separate from the SEV initialization code, and are never
> used on the early startup path in the core kernel. So start separating
> it from the SEV startup code, by moving the decompressor's copy of the
> instruction decoder to a separate source file. In a subsequent patch,
> the shared #VC handling code will be moved into a separate shared
> source file, which will be included here too and no longer into sev.c.
> That way, it no longer gets included into the early SEV startup code,
> and can be built in the ordinary way."
>
> Does that help?
Yap, definitely.
So the logic is, everything in startup/ and everything that startup/
*includes* is going to end up being PIC and the rest is ordinary.
I guess that's one rule to separate it on.
Thanks!
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists