Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1963734pxk; Sat, 5 Sep 2020 04:06:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvVcQM9ToShvL4Wf2ZoGwfikV7cNJ8sWVsW/hGUgLjp6k/UWXOmlU0RSEuumZJp0w2NeaK X-Received: by 2002:a17:907:118c:: with SMTP id uz12mr996881ejb.321.1599303988974; Sat, 05 Sep 2020 04:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599303988; cv=none; d=google.com; s=arc-20160816; b=B6sQpdqQcJEsRdzF/+p37wT6+RizMtWJyOSudwFddcWXPv8eCWGLbXvnyHC8qf3YCA oa6Fe1fO7T5iTofj3IoGSpp5VxK0rkV7Pa6WswHoMONGeF3Yn7IRKiwNY/UNiiCycebg BX/sUT2qkfGtedxVD+jtXZyfAdAlZRkFDUhwEaVBGUM6ePnit7DqZ3gLRE4Qc/AxfWXE vEc5a5hfEJd5+yBx/TOxwKCV8xl2S0tO2LIPFJ/9BKl0zAko6Qa/ZPM3I3LR1XBCXuwt g0QZRhTH+zO4VN6/JA3cwWNS480bt069ofJheRF/okbKa8FxVSXD3zZjwdd/eilll/86 TcMw== 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=ikXsTEZ2WymR2Ciwm8RoZRKB1aAfqbwcM5xtPAgLZ/4=; b=nJU6Jxr0dNBJIrAr+3rogfMjj60xLao4mE3ZO8ifQ2l1OWhkGUn30ctOXSz3pJTepe oSMsfOiPiCFXXI9ASONJDizR6+f29ZlE6ltBVEG/Q7/pRaSWn2pQUfrqx/34AjxSkdbE htNQhEmbZ9sfpzTR6Z9nK9LHyGSeF0dSpobX6eB26XinON5Z14jWXt4SBbApHi5inczw gTEZrsnsRiFYNBsGwEeffziUT9BIrz4NsC6uvanxr7GOdosApbf7umIePLGDhsdpOEH1 if63eZOShewAmtTRjl/MyXH2OP1bffxNvRqX+KfhO/O+z+UQ7PEfqUYstUd4+1uXA8av p03g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ZMH/9Dxi"; 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 md18si6136980ejb.343.2020.09.05.04.05.36; Sat, 05 Sep 2020 04:06:28 -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="ZMH/9Dxi"; 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 S1728495AbgIELEP (ORCPT + 99 others); Sat, 5 Sep 2020 07:04:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:57778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726597AbgIELEO (ORCPT ); Sat, 5 Sep 2020 07:04:14 -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 BE1932074B; Sat, 5 Sep 2020 11:04:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599303853; bh=W7V8ZU7QH4bhyjnEuCPx/ysHegXohN29y01K74kjKS8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZMH/9Dxi3qJfkhd7VLtbaguJfgBtdzMSQCGEujpCfOvhFG2+ePwZNWWEC3jCpJtyO qwWscifFtIwxsOvPw/yUPISHf+t+7GNXTNmFEUmy1Tyu+O9SHMxJ1DRfH9XUkW6mSl ZTCI6cAdDwK2idzR/d2ukgq/nOaU49BF6d4dwUAQ= 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 1kEVzP-009M5B-VJ; Sat, 05 Sep 2020 12:04:12 +0100 Date: Sat, 05 Sep 2020 12:04:10 +0100 Message-ID: <87363wmqmt.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 07/10] arm64/kvm: Add hypercall service for kvm ptp. In-Reply-To: <20200904092744.167655-8-jianyong.wu@arm.com> References: <20200904092744.167655-1-jianyong.wu@arm.com> <20200904092744.167655-8-jianyong.wu@arm.com> 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 Fri, 04 Sep 2020 10:27:41 +0100, Jianyong Wu wrote: > > ptp_kvm will get this service through smccc call. > The service offers wall time and counter cycle of host for guest. > caller must explicitly determines which cycle of virtual counter or > physical counter to return if it needs counter cycle. > > Signed-off-by: Jianyong Wu > --- > arch/arm64/kvm/Kconfig | 6 +++++ > arch/arm64/kvm/arch_timer.c | 2 +- > arch/arm64/kvm/hypercalls.c | 49 ++++++++++++++++++++++++++++++++++++ > include/kvm/arm_arch_timer.h | 1 + > include/linux/arm-smccc.h | 16 ++++++++++++ > 5 files changed, 73 insertions(+), 1 deletion(-) > [...] On top of what I said yesterday: > index 32ba6fbc3814..eb85f6701845 100644 > --- a/arch/arm64/kvm/arch_timer.c > +++ b/arch/arm64/kvm/arch_timer.c > @@ -81,7 +81,7 @@ u64 timer_get_cval(struct arch_timer_context *ctxt) > } > } > > -static u64 timer_get_offset(struct arch_timer_context *ctxt) > +u64 timer_get_offset(struct arch_timer_context *ctxt) > { > struct kvm_vcpu *vcpu = ctxt->vcpu; > Why has this become global? I can't see a reason why we would want to expose this purely KVM internal helper. M. -- Without deviation from the norm, progress is not possible.