Re: Hang when booting guest kernels compiled with clang after SRSO mitigations

From: Borislav Petkov
Date: Thu Aug 10 2023 - 04:11:08 EST


On Wed, Aug 09, 2023 at 06:33:34PM -0700, Nathan Chancellor wrote:
> Hi Boris,
>
> I updated my AMD 3990X workstation to a version of mainline that
> contains the SRSO mitigations and I am now seeing a hang when booting
> guest kernels built with clang in QEMU/KVM with an '-smp' value greater
> than one (I am just testing 'ARCH=x86_64 defconfig', nothing fancy). The
> host's kernel is built with GCC 13.2.0, in case that is relevant. The
> issue happens with all versions of clang that the kernel supports
> (11.x+). I do not see the issue with guest kernels built with GCC nor do
> I see the issue with '-smp 1', so it could be something that clang has
> done to the guest kernel that causes this but I figured I would report
> it early anyways.
>
> With '-smp 4' (for example), I see
>
> [ 0.102817] smpboot: CPU0: AMD Ryzen Threadripper 3990X 64-Core Processor (family: 0x17, model: 0x31, stepping: 0x0)
> ...
> [ 0.109778] smp: Bringing up secondary CPUs ...
> [ 0.110559] smpboot: x86: Booting SMP configuration:

I can repro this here with Debian clang version 14.0.6-2 even with -smp
2.

Lemme poke at this a bit.

Thx.


--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette