[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whvGhNS45F1huUNBpeh4O5yk-P04J1M6ugUedS+CQNakQ@mail.gmail.com>
Date: Sun, 20 Jul 2025 20:32:00 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ard Biesheuvel <ardb@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [GIT pull] x86/urgent for v6.16-rc7
On Sun, 20 Jul 2025 at 20:14, Ard Biesheuvel <ardb@...nel.org> wrote:
>
> Just tried this: adding 'noinstr' to the declaration in asm/sev.h
> makes no difference at all.
Ok, thanks for checking. It does seem a strange bug.
That said, this area is a mess, and I really do think it's at least
partly *our* mess.
We should mark not only __sev_es_nmi_complete(), but the
sev_es_nmi_complete() inline function wrapper as being 'noinstr'.
But we can't do that, because 'noinstr' explicitly includes
'noinline', so we cannot do something sane like
static __always_inline noinstr void sev_es_nmi_complete(void) ..
for the wrapper, because the compiler will very correctly say "I'm
sorry Dave, I can't do that".
So I still suspect that yes, it may be a gcc bug, but we're really
doing some things that make me go "at some point you really can't
blame the compiler too much for being confused".
I guess it doesn't matter - the bug is fixed, but I'd personally
hesitate to make a gcc bug report simply because if I was a compiler
person, I would take one look at this code and say "you're insane".
Linus
Powered by blists - more mailing lists