Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp479976rwl; Fri, 4 Nov 2022 02:44:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7cZVXKJDPxPP9V0BZ11OplEIkUPGRaLuwSFLDF0nrGmTeMvA5Og4cOfEapuqV8ZJCFCIvB X-Received: by 2002:a17:907:6296:b0:787:d066:9fcf with SMTP id nd22-20020a170907629600b00787d0669fcfmr31424529ejc.692.1667555072954; Fri, 04 Nov 2022 02:44:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667555072; cv=none; d=google.com; s=arc-20160816; b=jh1Gen8icBP6fgpNLUaTA/whoIzOzkzXXb+fu11ydV8s/cAD1aFFs64oUG4ajZph6d VJ2zsQSkNQ6F4dQazsaLTm2Oh/YBYGKKMHlOYICTIfEmjJig7iUz0a97DiSaZXLf+yXP GdkWmG5PpJr9IpJYlvtTrFFLfJTIfRh+ljxceaXnk9y8jGhsL8qytEMY7ZMLUHAaM4ug +lXcgMq843jNy/Ml/hNZOwSXtJrGYWP7LeGWnQ4wgldQUk2TWxGdri9Sxd219o8XkjxH iRGdcTadu/fqRNSkyC/0BFJCTna3cmhQ8F9DqTr3HNAH6nU3x4+mdK0TXxxLmNWGk1wT Lm2w== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=dQ7OSnClArmp0HwMik/vDMR5I1W/fC7TJoJu4MDU5j8=; b=Ex1bI88NwH7j7bHboGTixNPVZajFrg0jRa2mm5qEtlr8AUvgddtMQo0nmu/7nxrsdO Xfr+w9IIn7hDxjPquSOOpWY6qZbor3vu8u97/2AW+LqTGA6j1bsw1x8G2Bk+dtIL7OVv xDFx5o3D8BI0X7m9YniTLdtXAEiT9O8Cq8fbQotr0THEqs/QlbuNNCqgplgsfjXr44zU pLV+PzDY3oDaZn4FZbxjikNgwerLi227PAMoH34Do4i/w07NwtHFm6PMfry7beaw+FWe k/koYYL5tOaAkI86XcYroJCwJAC8FeYgrkxcEseVagLI1iWv3MeLJtPc8o4S7XzMUv63 cieg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id vj23-20020a170907131700b007a7fc67c880si1511274ejb.71.2022.11.04.02.44.09; Fri, 04 Nov 2022 02:44:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230377AbiKDJNc (ORCPT + 96 others); Fri, 4 Nov 2022 05:13:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230045AbiKDJNX (ORCPT ); Fri, 4 Nov 2022 05:13:23 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 89902291; Fri, 4 Nov 2022 02:13:20 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D87C61FB; Fri, 4 Nov 2022 02:13:25 -0700 (PDT) Received: from [10.1.27.15] (e122027.cambridge.arm.com [10.1.27.15]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0AAE83F703; Fri, 4 Nov 2022 02:13:16 -0700 (PDT) Message-ID: <55b704b7-0a44-8f34-e22f-d60b58db610f@arm.com> Date: Fri, 4 Nov 2022 09:13:14 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] arm64: paravirt: remove conduit check in has_pv_steal_clock To: Usama Arif , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, linux@armlinux.org.uk, yezengruan@huawei.com, catalin.marinas@arm.com, will@kernel.org, maz@kernel.org, mark.rutland@arm.com Cc: fam.zheng@bytedance.com, liangma@liangbit.com, punit.agrawal@bytedance.com References: <20221104061659.4116508-1-usama.arif@bytedance.com> Content-Language: en-GB From: Steven Price In-Reply-To: <20221104061659.4116508-1-usama.arif@bytedance.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/11/2022 06:16, Usama Arif wrote: > arm_smccc_1_1_invoke() which is called later on in the function > will return failure if there's no conduit (or pre-SMCCC 1.1), > hence the check is unnecessary. > > Suggested-by: Steven Price > Signed-off-by: Usama Arif Reviewed-by: Steven Price > --- > arch/arm64/kernel/paravirt.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/arch/arm64/kernel/paravirt.c b/arch/arm64/kernel/paravirt.c > index 57c7c211f8c7..aa718d6a9274 100644 > --- a/arch/arm64/kernel/paravirt.c > +++ b/arch/arm64/kernel/paravirt.c > @@ -141,10 +141,6 @@ static bool __init has_pv_steal_clock(void) > { > struct arm_smccc_res res; > > - /* To detect the presence of PV time support we require SMCCC 1.1+ */ > - if (arm_smccc_1_1_get_conduit() == SMCCC_CONDUIT_NONE) > - return false; > - > arm_smccc_1_1_invoke(ARM_SMCCC_ARCH_FEATURES_FUNC_ID, > ARM_SMCCC_HV_PV_TIME_FEATURES, &res); >