diff mbox series

[kvm-unit-tests,2/2] x86: pku: fix parameter passing

Message ID 20191025090329.11679-2-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
Parameter error_code is passed in the function definition while
the caller miss it. Fix it.

Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
---
 x86/pku.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Paolo Bonzini Nov. 11, 2019, 1:45 p.m. UTC | #1
On 25/10/19 11:03, Chenyi Qiang wrote:
> Parameter error_code is passed in the function definition while
> the caller miss it. Fix it.
> 
> Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
> ---
>  x86/pku.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/x86/pku.c b/x86/pku.c
> index 62fb261..1ce73fa 100644
> --- a/x86/pku.c
> +++ b/x86/pku.c
> @@ -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
diff mbox series

Patch

diff --git a/x86/pku.c b/x86/pku.c
index 62fb261..1ce73fa 100644
--- a/x86/pku.c
+++ b/x86/pku.c
@@ -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__