* [kvm-unit-tests PATCH 1/2] x86: smap: Use correct reg to pass a parameter
@ 2019-10-25 9:03 Chenyi Qiang
2019-10-25 9:03 ` [kvm-unit-tests PATCH 2/2] x86: pku: fix parameter passing Chenyi Qiang
0 siblings, 1 reply; 3+ messages in thread
From: Chenyi Qiang @ 2019-10-25 9:03 UTC (permalink / raw)
To: kvm; +Cc: Paolo Bonzini
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 --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__
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [kvm-unit-tests PATCH 2/2] x86: pku: fix parameter passing
2019-10-25 9:03 [kvm-unit-tests PATCH 1/2] x86: smap: Use correct reg to pass a parameter Chenyi Qiang
@ 2019-10-25 9:03 ` Chenyi Qiang
2019-11-11 13:45 ` Paolo Bonzini
0 siblings, 1 reply; 3+ messages in thread
From: Chenyi Qiang @ 2019-10-25 9:03 UTC (permalink / raw)
To: kvm; +Cc: Paolo Bonzini
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__
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [kvm-unit-tests PATCH 2/2] x86: pku: fix parameter passing
2019-10-25 9:03 ` [kvm-unit-tests PATCH 2/2] x86: pku: fix parameter passing Chenyi Qiang
@ 2019-11-11 13:45 ` Paolo Bonzini
0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2019-11-11 13:45 UTC (permalink / raw)
To: Chenyi Qiang, kvm
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-11 13:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25 9:03 [kvm-unit-tests PATCH 1/2] x86: smap: Use correct reg to pass a parameter Chenyi Qiang
2019-10-25 9:03 ` [kvm-unit-tests PATCH 2/2] x86: pku: fix parameter passing Chenyi Qiang
2019-11-11 13:45 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).