Re: [PATCH v3] x86/asm: Force native_apic_mem_read to use mov

From: Dave Hansen
Date: Thu Feb 08 2024 - 11:48:12 EST


On 2/6/24 14:36, Adam Dunlap wrote:
..
> In particular, when compiled with clang and run as a SEV-ES or
> SEV-SNP guest, the compiler would emit a testl instruction which is
> not supported by the SEV-ES emulator

What changed? Why is this a bug that we're only noticing now? The line
of code that's modified here is from 2008.

I assume that it's something new in clang, but it'd be great to know
that for sure.

Also, considering the age of the last commit to touch that line:

Fixes: 67c5fc5c330f ("x86: merge apic_32/64.h")

this seems like the kind of thing we'll want in -stable in case folks
are compiling stable kernels with new clangs.