Re: [PATCH v7 9/9] x86/startup_64: Drop global variables keeping track of LA57 state
From: Borislav Petkov
Date: Fri Mar 01 2024 - 14:20:41 EST
On Tue, Feb 27, 2024 at 04:19:17PM +0100, Ard Biesheuvel wrote:
> + asm(ALTERNATIVE_TERNARY(
> + "movq %%cr4, %[reg] \n\t btl %[la57], %k[reg]" CC_SET(c),
> + %P[feat], "stc", "clc")
> + : [reg] "=&r" (r), CC_OUT(c) (ret)
> + : [feat] "i" (X86_FEATURE_LA57),
> + [la57] "i" (X86_CR4_LA57_BIT)
> + : "cc");
> +
> + return ret;
Yeah, I said this is creative but an alternative here looks like an
overkill.
Can we use a RIP_REL_REF(global var) instead pls?
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette