From: Oliver Upton oupton@google.com
[ Upstream commit 01f91acb55be7aac3950b89c458bcea9ef6e4f49 ]
The SMC64 calling convention passes a function identifier in w0 and its parameters in x1-x17. Given this, there are two deviations in the SMC64 call performed by the steal_time test: the function identifier is assigned to a 64 bit register and the parameter is only 32 bits wide.
Align the call with the SMCCC by using a 32 bit register to handle the function identifier and increasing the parameter width to 64 bits.
Suggested-by: Andrew Jones drjones@redhat.com Signed-off-by: Oliver Upton oupton@google.com Reviewed-by: Andrew Jones drjones@redhat.com Message-Id: 20210921171121.2148982-3-oupton@google.com Signed-off-by: Paolo Bonzini pbonzini@redhat.com Signed-off-by: Sasha Levin sashal@kernel.org --- tools/testing/selftests/kvm/steal_time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/kvm/steal_time.c b/tools/testing/selftests/kvm/steal_time.c index fcc840088c91..7daedee3e7ee 100644 --- a/tools/testing/selftests/kvm/steal_time.c +++ b/tools/testing/selftests/kvm/steal_time.c @@ -120,12 +120,12 @@ struct st_time { uint64_t st_time; };
-static int64_t smccc(uint32_t func, uint32_t arg) +static int64_t smccc(uint32_t func, uint64_t arg) { unsigned long ret;
asm volatile( - "mov x0, %1\n" + "mov w0, %w1\n" "mov x1, %2\n" "hvc #0\n" "mov %0, x0\n"
On 06/10/21 13:12, Sasha Levin wrote:
From: Oliver Upton oupton@google.com
[ Upstream commit 01f91acb55be7aac3950b89c458bcea9ef6e4f49 ]
The SMC64 calling convention passes a function identifier in w0 and its parameters in x1-x17. Given this, there are two deviations in the SMC64 call performed by the steal_time test: the function identifier is assigned to a 64 bit register and the parameter is only 32 bits wide.
Align the call with the SMCCC by using a 32 bit register to handle the function identifier and increasing the parameter width to 64 bits.
Suggested-by: Andrew Jones drjones@redhat.com Signed-off-by: Oliver Upton oupton@google.com Reviewed-by: Andrew Jones drjones@redhat.com Message-Id: 20210921171121.2148982-3-oupton@google.com Signed-off-by: Paolo Bonzini pbonzini@redhat.com Signed-off-by: Sasha Levin sashal@kernel.org
tools/testing/selftests/kvm/steal_time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/kvm/steal_time.c b/tools/testing/selftests/kvm/steal_time.c index fcc840088c91..7daedee3e7ee 100644 --- a/tools/testing/selftests/kvm/steal_time.c +++ b/tools/testing/selftests/kvm/steal_time.c @@ -120,12 +120,12 @@ struct st_time { uint64_t st_time; }; -static int64_t smccc(uint32_t func, uint32_t arg) +static int64_t smccc(uint32_t func, uint64_t arg) { unsigned long ret; asm volatile(
"mov x0, %1\n"
"mov x1, %2\n" "hvc #0\n" "mov %0, x0\n""mov w0, %w1\n"
Just fixing tests, but anyway:
Acked-by: Paolo Bonzini pbonzini@redhat.com
On Wed, Oct 06, 2021 at 01:22:31PM +0200, Paolo Bonzini wrote:
On 06/10/21 13:12, Sasha Levin wrote:
From: Oliver Upton oupton@google.com
[ Upstream commit 01f91acb55be7aac3950b89c458bcea9ef6e4f49 ]
The SMC64 calling convention passes a function identifier in w0 and its parameters in x1-x17. Given this, there are two deviations in the SMC64 call performed by the steal_time test: the function identifier is assigned to a 64 bit register and the parameter is only 32 bits wide.
Align the call with the SMCCC by using a 32 bit register to handle the function identifier and increasing the parameter width to 64 bits.
Suggested-by: Andrew Jones drjones@redhat.com Signed-off-by: Oliver Upton oupton@google.com Reviewed-by: Andrew Jones drjones@redhat.com Message-Id: 20210921171121.2148982-3-oupton@google.com Signed-off-by: Paolo Bonzini pbonzini@redhat.com Signed-off-by: Sasha Levin sashal@kernel.org
tools/testing/selftests/kvm/steal_time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/kvm/steal_time.c b/tools/testing/selftests/kvm/steal_time.c index fcc840088c91..7daedee3e7ee 100644 --- a/tools/testing/selftests/kvm/steal_time.c +++ b/tools/testing/selftests/kvm/steal_time.c @@ -120,12 +120,12 @@ struct st_time { uint64_t st_time; }; -static int64_t smccc(uint32_t func, uint32_t arg) +static int64_t smccc(uint32_t func, uint64_t arg) { unsigned long ret; asm volatile(
"mov x0, %1\n"
"mov x1, %2\n" "hvc #0\n" "mov %0, x0\n""mov w0, %w1\n"
Just fixing tests, but anyway:
Acked-by: Paolo Bonzini pbonzini@redhat.com
I'll queue up all the ones you acked, thanks!
linux-kselftest-mirror@lists.linaro.org