Commit 6649fa87 authored by Peter Zijlstra's avatar Peter Zijlstra
parent 214b9a83
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
#define X16(x...) X8(x), X8(x) #define X16(x...) X8(x), X8(x)
#define NR_FASTOP (ilog2(sizeof(ulong)) + 1) #define NR_FASTOP (ilog2(sizeof(ulong)) + 1)
#define FASTOP_SIZE 8 #define FASTOP_SIZE (8 * (1 + HAS_KERNEL_IBT))
struct opcode { struct opcode {
u64 flags; u64 flags;
...@@ -311,7 +311,8 @@ static int fastop(struct x86_emulate_ctxt *ctxt, fastop_t fop); ...@@ -311,7 +311,8 @@ static int fastop(struct x86_emulate_ctxt *ctxt, fastop_t fop);
#define __FOP_FUNC(name) \ #define __FOP_FUNC(name) \
".align " __stringify(FASTOP_SIZE) " \n\t" \ ".align " __stringify(FASTOP_SIZE) " \n\t" \
".type " name ", @function \n\t" \ ".type " name ", @function \n\t" \
name ":\n\t" name ":\n\t" \
ASM_ENDBR
#define FOP_FUNC(name) \ #define FOP_FUNC(name) \
__FOP_FUNC(#name) __FOP_FUNC(#name)
...@@ -433,6 +434,7 @@ static int fastop(struct x86_emulate_ctxt *ctxt, fastop_t fop); ...@@ -433,6 +434,7 @@ static int fastop(struct x86_emulate_ctxt *ctxt, fastop_t fop);
".align 4 \n\t" \ ".align 4 \n\t" \
".type " #op ", @function \n\t" \ ".type " #op ", @function \n\t" \
#op ": \n\t" \ #op ": \n\t" \
ASM_ENDBR \
#op " %al \n\t" \ #op " %al \n\t" \
__FOP_RET(#op) __FOP_RET(#op)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment