lkml.org 
[lkml]   [2021]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/26] x86/tdx: Extend the cc_platform_has() API to support TDX guests
On Wed, Dec 15, 2021 at 03:19:04PM -0800, Josh Poimboeuf wrote:
> On Tue, Dec 14, 2021 at 06:02:40PM +0300, Kirill A. Shutemov wrote:
> > --- a/arch/x86/kernel/Makefile
> > +++ b/arch/x86/kernel/Makefile
> > @@ -22,6 +22,7 @@ CFLAGS_REMOVE_early_printk.o = -pg
> > CFLAGS_REMOVE_head64.o = -pg
> > CFLAGS_REMOVE_sev.o = -pg
> > CFLAGS_REMOVE_cc_platform.o = -pg
> > +CFLAGS_REMOVE_tdx.o = -pg
> > endif
> >
> > KASAN_SANITIZE_head$(BITS).o := n
> > @@ -31,6 +32,7 @@ KASAN_SANITIZE_stacktrace.o := n
> > KASAN_SANITIZE_paravirt.o := n
> > KASAN_SANITIZE_sev.o := n
> > KASAN_SANITIZE_cc_platform.o := n
> > +KASAN_SANITIZE_tdx.o := n
> >
> > # With some compiler versions the generated code results in boot hangs, caused
> > # by several compilation units. To be safe, disable all instrumentation.
> > @@ -50,6 +52,7 @@ KCOV_INSTRUMENT := n
> >
> > CFLAGS_head$(BITS).o += -fno-stack-protector
> > CFLAGS_cc_platform.o += -fno-stack-protector
> > +CFLAGS_tdx.o += -fno-stack-protector
> >
> > CFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace
>
> Don't these Makefile changes belong in patch 1, which adds tdx.c?

Removing of the instrumentation is required because is_tdx_guest() is
called from cc_platform_has().

Commit message tries to communicate this:

Since is_tdx_guest() function (through cc_platform_has() API) is used in
the early boot code, disable the instrumentation flags and function
tracer. This is similar to AMD SEV and cc_platform.c.

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2021-12-16 00:36    [W:0.100 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site