On 05/01/2026 3:58 pm, Jan Beulich wrote:
> On 30.12.2025 14:54, Andrew Cooper wrote:
>> --- a/xen/arch/x86/include/asm/asm-defns.h
>> +++ b/xen/arch/x86/include/asm/asm-defns.h
>> @@ -1,9 +1,5 @@
>> #include <asm/page-bits.h>
>>
>> -.macro clzero
>> - .byte 0x0f, 0x01, 0xfc
>> -.endm
> This can't go away yet, as it became known to gas only in 2.26.
>
>> --- a/xen/arch/x86/include/asm/prot-key.h
>> +++ b/xen/arch/x86/include/asm/prot-key.h
>> @@ -19,16 +19,14 @@ static inline uint32_t rdpkru(void)
>> {
>> uint32_t pkru;
>>
>> - asm volatile ( ".byte 0x0f,0x01,0xee"
>> - : "=a" (pkru) : "c" (0) : "dx" );
>> + asm volatile ( "rdpkru" : "=a" (pkru) : "c" (0) : "dx" );
>>
>> return pkru;
>> }
>>
>> static inline void wrpkru(uint32_t pkru)
>> {
>> - asm volatile ( ".byte 0x0f,0x01,0xef"
>> - :: "a" (pkru), "d" (0), "c" (0) );
>> + asm volatile ( "wrpkru" :: "a" (pkru), "d" (0), "c" (0) );
>> }
> Same for both of these.
Oh - so they did.
This is a fairly old patch, and I don't recall exactly how I did the
analysis, but it was clearly wrong now I've double checked the 2.25 branch.
I'll annotate these rather than dropping them.
~Andrew