Re: RFC, untested: handing of MSR immediates and MSRs on Xen
From: Uros Bizjak
Date: Wed Oct 23 2024 - 18:08:14 EST
On 23. 10. 24 23:34, H. Peter Anvin wrote:
And I of course forgot the include the actual code.
ALTERNATIVE_2("ds wrmsr",
"wrmsrns",
X86_FEATURE_WRMSRNS,
"call %P[xen]",
X86_FEATURE_XENPV)
Please use %c asm operand modifier instead of %P. Please see comment in
arch/x86/include/asm/alternative.h for the reason:
--q--
* Use the %c operand modifier which is the generic way to print a bare
* constant expression with all syntax-specific punctuation omitted. %P
* is the x86-specific variant which can handle constants too, for
* historical reasons, but it should be used primarily for PIC
* references: i.e., if used for a function, it would add the PLT
* suffix.
--/q--
Uros.