Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp356931pxb; Wed, 6 Oct 2021 06:31:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOvXv+Rw0EdsbHjyPo+uhNTtLJElG9j9HLVSQV4FKpyCrAmlxwblDQ9N4bueXARv6+Dwn3 X-Received: by 2002:a17:902:dace:b0:13e:f73b:6b5d with SMTP id q14-20020a170902dace00b0013ef73b6b5dmr3455563plx.49.1633527107058; Wed, 06 Oct 2021 06:31:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633527107; cv=none; d=google.com; s=arc-20160816; b=IcD2HEYGH2A+XZNQJKLb1IjqaTTkiS06VOC5jX/B3qkoQCGoJl7OhKFcSgqMZKRyHD HgE3IY31J0NDDO5z3LWQCapVMJn2uKJLoGAL60jjh9wf2r7is1ocCIPCRSa+/QkP+eWw gfViwt/yROpMOphDwj+IGhjCxyz8qyvOZ7lXUNT1rVlryF62Q1SJ408uvjiBiWbHMDvZ BBX3wNlpo2VecQYpLHliFjNp2sCK/hF9TdMdur5JQDKLNbVGOtFAnnIln5sO+b5Wt7gB MaPyPFpZr0lrD6ciMfkbkb9bEV/UPigqe0aeb8fl+C5nWGSwy3wIrYrORRdiUoHXbfry dvew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nOf/BxzhrL6UAuuqASBAg/UM2zAfZyegogJ/857AWSY=; b=Hg1QZyTtjszCvwe3NMutlCrgOlB6MVVYYZlJjYh+Dzry18yMuiZiYC3Lp9u3Pi1am3 mqRTy4ie9GjAQtlTJFVwKCawn/zX+mezpN/zl6bYhkT8IuDO3OpsEbRZxCEkls35a8tr 35mYuKeZrzvrYCOk9ojdVKo3LJlZ1X9yEhoFE8Gxt0XJFsq3upDRXYLPpAn90ehJtd/N KVu2Oxe8EaagY6DSWeQKPHw26SPEexaJWo504n3umXNpdFaDiz87YeI0yFSkdtKL4+BU oVCTU4b8s/ATanXHiQMPlc2T29RbmCb0nJWJMqxjX85ybxoY4rcafvjyu/RJquMlPDm+ ff0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tkb3pEoH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p37si5794763pgb.550.2021.10.06.06.31.27; Wed, 06 Oct 2021 06:31:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tkb3pEoH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238781AbhJFNcR (ORCPT + 99 others); Wed, 6 Oct 2021 09:32:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:48718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238668AbhJFNcQ (ORCPT ); Wed, 6 Oct 2021 09:32:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A41761075; Wed, 6 Oct 2021 13:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633527023; bh=9qZBQ9nSSGmzYKY0SK0EQqGdDNghIYVVge/l33TN3ZY=; h=From:To:Cc:Subject:Date:From; b=Tkb3pEoHGlfHwUB66TL16IMFMczqvRR8bMGnFQsqlW1v4YEebjXQI8HNB/SM2zRQE BVrmhhKb/d6+YGHancRCxaoXl6s2QNRdZbh0Trdw/SlT80Oc5al9Ryygx1fAGfvqVU dXzq0ATIdIgs0p1B61nVqnHKZiJKK8somkJ7E9otJMHPYXtI7bqcJ09fBdyBZZGdbH eML0aRgoRdtn3w7OJLWSTs2aDCANJOWKXLDaEXCwmiQ0boHs0yb+fOHzhhNtU3O60/ 7M2Fl1DlXsqgXbxlOZAX2CfhwCfp1A/xUqX2v7BuI/o2NHS39Fc2EYq41YPsJiX3Yj B8nqwXFDFZZww== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Oliver Upton , Andrew Jones , Paolo Bonzini , Sasha Levin , shuah@kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH MANUALSEL 5.14 1/9] selftests: KVM: Align SMCCC call with the spec in steal_time Date: Wed, 6 Oct 2021 09:30:13 -0400 Message-Id: <20211006133021.271905-1-sashal@kernel.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oliver Upton [ 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 Signed-off-by: Oliver Upton Reviewed-by: Andrew Jones Message-Id: <20210921171121.2148982-3-oupton@google.com> Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin --- 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