diff mbox series

[kvm-unit-tests,1/2] x86: smap: Use correct reg to pass a parameter

Message ID 20191025090329.11679-1-chenyi.qiang@intel.com (mailing list archive)
State New, archived
Headers show
Series [kvm-unit-tests,1/2] x86: smap: Use correct reg to pass a parameter | expand

Commit Message

Chenyi Qiang Oct. 25, 2019, 9:03 a.m. UTC
The first parameter is passed using rdi in x86_64.

Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
---
 x86/smap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/x86/smap.c b/x86/smap.c
index c0376e3..a8f48b8 100644
--- a/x86/smap.c
+++ b/x86/smap.c
@@ -29,7 +29,7 @@  asm ("pf_tss:\n"
         // no task on x86_64, save/restore caller-save regs
         "push %rax; push %rcx; push %rdx; push %rsi; push %rdi\n"
         "push %r8; push %r9; push %r10; push %r11\n"
-	"mov 9*8(%rsp),%rsi\n"
+	"mov 9*8(%rsp),%rdi\n"
 #endif
 	"call do_pf_tss\n"
 #ifdef __x86_64__