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.

Jan

Reply via email to