... in order to reuse stgi elsewhere.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
#include <asm/asm_defns.h>
#include <asm/page.h>
-#define VMRUN .byte 0x0F,0x01,0xD8
-#define STGI .byte 0x0F,0x01,0xDC
-#define CLGI .byte 0x0F,0x01,0xDD
-
ENTRY(svm_asm_do_resume)
GET_CURRENT(bx)
.Lsvm_do_resume:
pop %rsi
pop %rdi
- CLGI
+ clgi
sti
- VMRUN
+ vmrun
SAVE_ALL
SPEC_CTRL_ENTRY_FROM_HVM /* Req: b=curr %rsp=regs/cpuinfo, Clob: acd */
/* WARNING! `ret`, `call *`, `jmp *` not safe before this point. */
- STGI
+ stgi
GLOBAL(svm_stgi_label)
mov %rsp,%rdi
call svm_vmexit_handler
.endm
#endif
+.macro vmrun
+ .byte 0x0f, 0x01, 0xd8
+.endm
+
+.macro stgi
+ .byte 0x0f, 0x01, 0xdc
+.endm
+
+.macro clgi
+ .byte 0x0f, 0x01, 0xdd
+.endm
+
.macro INDIRECT_BRANCH insn:req arg:req
/*
* Create an indirect branch. insn is one of call/jmp, arg is a single