Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2510669pxk; Sun, 6 Sep 2020 03:02:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPR4310NcrnA2rqDd7obuZkyBICWGTCWoq9t8Z5HPUKTwQr3lh5WhdYIoFPhePdNPQRvF4 X-Received: by 2002:a17:906:17c5:: with SMTP id u5mr15531376eje.453.1599386570155; Sun, 06 Sep 2020 03:02:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599386570; cv=none; d=google.com; s=arc-20160816; b=Uv6EtXenLJw9QDe1fj4K2lC6YXWKuQmLYCfWqIKTq4ckYAejxtYNTggLLlckoB6lE0 T2gHVLcaJuIQ0CvLAsDrJNw5bi2efvn6ziDZBs5WtKvKv3Pyczu54ppCwpfTtzN6gOQy pxScxSXU5BVnP4kPV1Gp4NCo/4M5XZyZb7W4sjXbGVBY04QJK/qqCZ1exoVn7p+mSHDV DDyX+OPEI11vwD7MYPuIA5ZqwlkadDuP1xe8F/95x5TwWpGPaULAUlACtBjlybTlwFeB V9dFMxDXwc9BGW+kEC9XkuWrTzKNDEvS2eezfNnzhXQGrBgYopVBUOU0Xnho6/ZLutFx GkXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date:dkim-signature; bh=2majzyWoE0zE5MaROxnc05zd1EqttyvZKtXjebAyNhs=; b=JkvXwL+UW4n/F5Ygz0AnrH6NoKhclzWt/7r2g8+1R0HKX+C0iE70DnkGGzwAacJdz8 h5WT4k70BU/MelelfI6B+NEnL/xGSWGe4eSYtW18L17qoGlm0aW4UEe4w0N/tWt9a+j5 OfVE9q0/QydHrRtc+XDdMWpF0AU9RmwBT6PPOBJKS1LSeBeNiya2qXdEdIhvXYOZNqq0 JWEV99JH5BlhdNZ3FV8T/4cLNkMYAh0tWiRfDxOA6LO87gyj8fRROV1qg+BghxFknhw/ dUDshB5Vd1WUmcLbuvCbp2eJvJQLehCqmbzQzWWwp36eqpjGHq1nJux+egyN41jcMgFZ mqnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=padBi9be; 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 b3si8147338ejg.126.2020.09.06.03.01.56; Sun, 06 Sep 2020 03:02:50 -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=default header.b=padBi9be; 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 S1728726AbgIFKAm (ORCPT + 99 others); Sun, 6 Sep 2020 06:00:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:58814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728409AbgIFKAm (ORCPT ); Sun, 6 Sep 2020 06:00:42 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 72BD020C09; Sun, 6 Sep 2020 10:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599386441; bh=xHQqZTgXCo9bG8b+58U7d9l8AXfNEF3WvvWP0N8iMwA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=padBi9beMPCn9TaUhHfcr7u7ocmvU4ZufL8GdW+cTbaDJHVg9mSd1DeCo9qYNxC6V fgfxAIVQDGf7OXYL6/piZvwcld3Sw3Xgwt4bpYyi2q5SWENp5ZpcF1cT3MYmJ+qHOZ ryBpAYpNNwdouDjr86jnFlgJ3P6v/VkLwJVrtvNM= Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kErTT-009W75-H7; Sun, 06 Sep 2020 11:00:39 +0100 Date: Sun, 06 Sep 2020 11:00:37 +0100 Message-ID: <87363vmdh6.wl-maz@kernel.org> From: Marc Zyngier To: Jianyong Wu Cc: netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com, sean.j.christopherson@intel.com, richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org, suzuki.poulose@arm.com, steven.price@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Steve.Capper@arm.com, justin.he@arm.com, nd@arm.com Subject: Re: [PATCH v14 08/10] ptp: arm64: Enable ptp_kvm for arm64 In-Reply-To: <874kocmqqx.wl-maz@kernel.org> References: <20200904092744.167655-1-jianyong.wu@arm.com> <20200904092744.167655-9-jianyong.wu@arm.com> <874kocmqqx.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: jianyong.wu@arm.com, netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com, sean.j.christopherson@intel.com, richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org, suzuki.poulose@arm.com, steven.price@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Steve.Capper@arm.com, justin.he@arm.com, nd@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 05 Sep 2020 12:01:42 +0100, Marc Zyngier wrote: > > On Fri, 04 Sep 2020 10:27:42 +0100, > Jianyong Wu wrote: [...] > > +{ > > + ktime_t ktime; > > + > > + arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_KVM_PTP_FUNC_ID, > > + hvc_res); > > + if ((long long)(hvc_res->a0) < 0) > > + return -EOPNOTSUPP; > > Really? What if the cycle counter is a full 64 bit value, as it is > *mandated* on ARMv8.6? It means that the counter is now invalid for > half the lifetime of the system. Not acceptable either. Having re-read this, this field doesn't contain the cycle counter, but the time in ns. So checking for a negative value should actually be fine for quite a while. My other comments still stand though. Thanks, M. -- Without deviation from the norm, progress is not possible.