Re: [PATCH 2/2] x86/sev: Get rid of special sev_es_enable_key

From: Borislav Petkov
Date: Thu Mar 23 2023 - 05:56:01 EST


On Thu, Mar 23, 2023 at 10:17:15AM +0100, Thomas Gleixner wrote:
> That's not sufficient. This function invokes static functions which the
> compiler can rightfully put out of line resulting in a noinstr violation.

Right, as mentioned on IRC, if we're going to use the cc_platform_has()
thing to do simple arch-agnostic confidential guests checks, perhaps we
should make it and the underlying functions it calls simply
__always_inline so that the compiler can optimize stuff even more and
not have function calls for such simple tests...

--
Regards/Gruss,
Boris.

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