x86: smap: Use correct reg to pass a parameter
PATCH 1/2 x86: smap: Use correct reg to pass a parameter
The first parameter is passed using rdi in x86_64.
Signed-off-by Chenyi Qiang <[email protected]>
--- x86/smap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
x86/smap.c +1 -1
@@ -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__
Signature · 1 line
2.17.1
PATCH 2/2 x86: pku: fix parameter passing
Parameter error_code is passed in the function definition while the caller miss it. Fix it.
Signed-off-by Chenyi Qiang <[email protected]>
--- x86/pku.c | 1 + 1 file changed, 1 insertion(+)
x86/pku.c +1 -0
@@ -38,6 +38,7 @@ asm ("pf_tss: \n\t"// 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),%rdi\n"#endif "call do_pf_tss \n\t" #ifdef __x86_64__
Signature · 1 line
2.17.1
Paolo Bonzini
maintainerRe: [kvm-unit-tests PATCH 2/2] x86: pku: fix parameter passing
Quoted 14 lines · Chenyi Qiang
Parameter
error_codeis passed in the function definition while the caller miss it. Fix it.Signed-off-by Chenyi Qiang <[email protected]>--- x86/pku.c | 1 + 1 file changed, 1 insertion(+)x86/pku.c +0
-0
x86/pku.c asm ("pf_tss: \n\t" · line 44
Quoted 7 lines
x86/pku.c +1
-0@@ -38,6 +38,7 @@ asm ("pf_tss: \n\t"// 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),%rdi\n"#endif "call do_pf_tss \n\t" #ifdef __x86_64__
Currently harmless, but should be fixed. I queued both patches.
Paolo