https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
--- Comment #5 from Linus Torvalds <torva...@linux-foundation.org> --- (In reply to Linus Torvalds from comment #2) > > So we could make our workaround option be something like > > config GCC_ASM_GOTO_WORKAROUND > def_bool y > depends on CC_IS_GCC && GCC_VERSION < 120100 Replying to myself some more, since that kernel side workaround is actually in two parts: it does the extra empty inline asm as an extra barrier, but it *also* adds the 'volatile' to the asm with outputs to work around the other gcc bug. And that other fix ("Mark asm goto with outputs as volatile") is *not* in gcc-12.1.0. It has only made it into gcc-13.2.0 (and it's pending in the gcc-12 release branch if I read things right). I suspect that other bug doesn't affect Sean's kvm case, because the outputs are always used, but it could affect other kernel code. So we'd want to have at least gcc-13.2 to be safe. Hmm. We could make the "add volatile manually" be the default workaround, though, since it shouldn't matter.