linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH MANUALSEL 5.14 1/9] selftests: KVM: Align SMCCC call with the spec in steal_time
@ 2021-10-06 13:30 Sasha Levin
  2021-10-06 13:30 ` [PATCH MANUALSEL 5.14 2/9] KVM: x86: Handle SRCU initialization failure during page track init Sasha Levin
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Sasha Levin @ 2021-10-06 13:30 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Oliver Upton, Andrew Jones, Paolo Bonzini, Sasha Levin, shuah,
	kvm, linux-kselftest

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 ecec30865a74..aafaa8e38b7c 100644
--- a/tools/testing/selftests/kvm/steal_time.c
+++ b/tools/testing/selftests/kvm/steal_time.c
@@ -118,12 +118,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"
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-10-07 17:47 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06 13:30 [PATCH MANUALSEL 5.14 1/9] selftests: KVM: Align SMCCC call with the spec in steal_time Sasha Levin
2021-10-06 13:30 ` [PATCH MANUALSEL 5.14 2/9] KVM: x86: Handle SRCU initialization failure during page track init Sasha Levin
2021-10-06 13:36   ` Paolo Bonzini
2021-10-06 13:30 ` [PATCH MANUALSEL 5.14 3/9] KVM: do not shrink halt_poll_ns below grow_start Sasha Levin
2021-10-06 13:36   ` Paolo Bonzini
2021-10-06 13:30 ` [PATCH MANUALSEL 5.14 4/9] KVM: x86: reset pdptrs_from_userspace when exiting smm Sasha Levin
2021-10-06 13:36   ` Paolo Bonzini
2021-10-07 15:23     ` Naresh Kamboju
2021-10-07 17:47       ` Paolo Bonzini
2021-10-06 13:30 ` [PATCH MANUALSEL 5.14 5/9] KVM: x86: VMX: synthesize invalid VM exit when emulating invalid guest state Sasha Levin
2021-10-06 13:35   ` Paolo Bonzini
2021-10-06 13:30 ` [PATCH MANUALSEL 5.14 6/9] KVM: x86: nVMX: don't fail nested VM entry on invalid guest state if !from_vmentry Sasha Levin
2021-10-06 13:36   ` Paolo Bonzini
2021-10-06 13:30 ` [PATCH MANUALSEL 5.14 7/9] kvm: x86: Add AMD PMU MSRs to msrs_to_save_all[] Sasha Levin
2021-10-06 13:36   ` Paolo Bonzini
2021-10-06 13:30 ` [PATCH MANUALSEL 5.14 8/9] KVM: x86: nSVM: restore int_vector in svm_clear_vintr Sasha Levin
2021-10-06 13:36   ` Paolo Bonzini
2021-10-06 13:30 ` [PATCH MANUALSEL 5.14 9/9] ALSA: pcsp: Make hrtimer forwarding more robust Sasha Levin
2021-10-06 13:36 ` [PATCH MANUALSEL 5.14 1/9] selftests: KVM: Align SMCCC call with the spec in steal_time 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).