Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp363505pxb; Wed, 6 Oct 2021 06:39:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynowYF9uSQQ3NlAt+FQMP/oVYVddoL5GUPkvlHfwaW2mCDbw4eJK/yWlL037K7mgY6Luyu X-Received: by 2002:a63:1e60:: with SMTP id p32mr20426442pgm.234.1633527576134; Wed, 06 Oct 2021 06:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633527576; cv=none; d=google.com; s=arc-20160816; b=yxwf+u/8LP4BRiE7ITP1FrXouCTvi57wPe1vsesvbkzMlNrJzzC8qHqRKcvr9mdJeC grmLfFcYVKtFXMyIrNAHPc9caX8PnFVKCfdPy8zQjYcfMaF8+Y4vEx1m6pWaePvgCSgj XVhj2jeR6FOhL+3vNPRtccn8i7AORPjx8/qmBWwuj+Pd83clvX8ZsZYB0enehW/8xrLv 92uUdKmI/MWTNYMFBYm32+bW0F2O+EatetDixBaRIJMYOkOfZBo/fEHOkavEFVkGDrmc qaaX7UqHJR0mqz4RrLVVH71OYgMe8ssemCEPfECszqRKjpL3YZbDTIVhT4NQcrk5DOQ6 1+FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=u/piGMVcmtfQU410RPWuDNLfDkB4Ox9Tyhdds4zXiGs=; b=y5N4meJmo5GpNX6SSuhen73Iwz3zVxcowk+ZNiCvlHAEeRU1VvfYnXLM/4Erja7J9n W0spf8M6kqstLzB6+1uIFB7xiwok0bWjfZER6k65M5w2GLdkc+Etj7LRBMF+lgqlN0Zc knU7vU8gs/uiPhfUH6DfZw3AvC6HiI3BlRVbi/BruWCL1s5hEWIsEv4Zx6Yi7p0mohjx XzNMZhlmtHXPwzuAvS0jOlMaY5CoKBnVya7RapnXNqSr3ZjnpGkqDy/IHOOy+JJhGrab ZsBhrrY+C62CKRbuGC8C9bei0BzVjYeJGHhhyOb9y/XHIMwsp7N3eMkZw3BBUr8IlOka N5MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JePM933D; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n186si28229864pfn.151.2021.10.06.06.39.21; Wed, 06 Oct 2021 06:39:36 -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=@redhat.com header.s=mimecast20190719 header.b=JePM933D; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238867AbhJFNi3 (ORCPT + 99 others); Wed, 6 Oct 2021 09:38:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45177 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238778AbhJFNiY (ORCPT ); Wed, 6 Oct 2021 09:38:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633527392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u/piGMVcmtfQU410RPWuDNLfDkB4Ox9Tyhdds4zXiGs=; b=JePM933DtVmQyKcPASJArr7S/+gc9gAsmT6tjwlwrhw8CuoqCzFAVSaxxguaAjFcmDyIuf FqKMnMbWNmvmxYK3BJurmBtDQqKrgbPx+KKTpegU559QWF57RI23X9WOaXQf913mi4boMC 7yo0YCzif5uPMiFYNvHG0Ywql7Ga/YY= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-463-ozb9Xa04NiKXHu6eWl36OA-1; Wed, 06 Oct 2021 09:36:20 -0400 X-MC-Unique: ozb9Xa04NiKXHu6eWl36OA-1 Received: by mail-ed1-f69.google.com with SMTP id 2-20020a508e02000000b003d871759f5dso2662373edw.10 for ; Wed, 06 Oct 2021 06:36:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=u/piGMVcmtfQU410RPWuDNLfDkB4Ox9Tyhdds4zXiGs=; b=zVC+UpHny1ZHCdUGETXCcJMLGAUEN2R1pLux22HwjHgOxUUrRtEzvrklkBZw4ZBP9t hpfdDa9JPvI5A7VD4gzga8V4LpVxGBz8S6vLvR32U8T+i0GmoR4n4b0iPrx8vTXajJAE BJ1BcWUIuOZJd5lfM1SH9zYZ5BRAQ5wIbGVK1XTzjVs9BXkq266MBZQWORHgQSJZ5Zsc bODIxTYBJHSqfqv3CMp5T6ItSFuEZtT//djQT91GJqTPodjZak5S649Ex3AbVdCLcl4u D2kV0FGKCtRzC0RoSB/ooaFHmqIAEIhvdhiktluTH6KGf8v6AA5/yHraT9lTGM791pBU iMAQ== X-Gm-Message-State: AOAM533aGW/ku+z5j4mk0LZYxHXoeA9hVVOY9DVrD9xDV1X1gobEaqTr mLqXJyqHYT/PY4HKWRA2CLyYukNw9s7OPlcG+LsgcLjLUn34yN48VlnShW/K/jCCZK8qTstpLhx 5jl7zTA980Rkw+vHTPOs+rD4W X-Received: by 2002:aa7:d5cd:: with SMTP id d13mr30216044eds.232.1633527379435; Wed, 06 Oct 2021 06:36:19 -0700 (PDT) X-Received: by 2002:aa7:d5cd:: with SMTP id d13mr30216018eds.232.1633527379258; Wed, 06 Oct 2021 06:36:19 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e? ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id j3sm4693182ejy.65.2021.10.06.06.36.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Oct 2021 06:36:18 -0700 (PDT) Message-ID: <61759137-0182-8eed-6413-80a8fc82c6e8@redhat.com> Date: Wed, 6 Oct 2021 15:36:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH MANUALSEL 5.14 1/9] selftests: KVM: Align SMCCC call with the spec in steal_time Content-Language: en-US To: Sasha Levin , linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Oliver Upton , Andrew Jones , shuah@kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20211006133021.271905-1-sashal@kernel.org> From: Paolo Bonzini In-Reply-To: <20211006133021.271905-1-sashal@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/10/21 15:30, Sasha Levin wrote: > 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" > Acked-by: Paolo Bonzini