lkml.org 
[lkml]   [2019]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v22 07/24] x86/sgx: Add wrappers for ENCLS leaf functions
On Mon, Oct 07, 2019 at 09:04:05PM -0700, Sean Christopherson wrote:
> > BIT(30)
>
> This is intentionally open coded so that it can be stringified in asm.

It stringifies just fine with the BIT() macro too:

# 187 "arch/x86/kernel/cpu/sgx/encls.h" 1
1: .byte 0x0f, 0x01, 0xcf;
2:
.section .fixup,"ax"
3: orl $((((1UL))) << (30)),%eax
jmp 2b
.previous

and the resulting object:

Disassembly of section .fixup:

0000000000000000 <.fixup>:
0: 0d 00 00 00 40 or $0x40000000,%eax
5: e9 00 00 00 00 jmpq a <__addressable_sgx_free_page107+0x2>

--
Regards/Gruss,
Boris.

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

\
 
 \ /
  Last update: 2019-10-08 09:19    [W:0.105 / U:12.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site