From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 574A3C2D0E4 for ; Mon, 23 Nov 2020 10:58:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D00BD2078E for ; Mon, 23 Nov 2020 10:58:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mdMfPU3k"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ggZdStaR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D00BD2078E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=c45uBs88/7KOTahuVJfL0wdvD8iknGBPX0TLgBLZoEY=; b=mdMfPU3kULeycONsKognc3Ekd tzEAF8x9GbWT2Kx9lpPxFEQWF+QE1Ek6Uv4wQeJRnFCKXxpMWO8ldLhZvsyfYj/K9PU0OsuZWLGMw O8geYcxHItR7KGFgQ9ZNm97pvlC4FaD6SjPSkC7bNIsfCpHUa/7zs6u3wnATpyFeUbUP2QHRKmaX6 lQxR1T+0E4Yz18+JaTHeBf7oMYIYgPGD8XCQgzA0Ypf0HXNLoLmFcK3cgkhW7OpUzrEgi5kumC993 xyD4XePb0m0edhTjVgzijWQFPmMg9U4mAE68CpPXekrQWhRcjilbyp0itD0u6vhCS8ted5q0bm7r7 mYJRrigng==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kh9Y4-0007Uy-As; Mon, 23 Nov 2020 10:58:20 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kh9Y1-0007UP-RD for linux-arm-kernel@lists.infradead.org; Mon, 23 Nov 2020 10:58:18 +0000 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 5037920781; Mon, 23 Nov 2020 10:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606129094; bh=/peUmxWwoiuoRZHOUT3CLjXhVSf0z9ZqsFQuW9bn+lU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ggZdStaRDcuClrAZIfESIxlWj27QHDRXUH+C/KbP+gjBJzkGUQ8cNmRBUUeSjPG6F K0qxnr2bzC3wS96VFks2K8I9SDy/jjGygPJY1Sjq0CYXMD8ayNzkFsFPaxMX6wUYaT oae+rHW3jiJs5Cclmn17vL0aVsm3Yjijau6Kl0KA= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1kh9Xw-00CtAH-3h; Mon, 23 Nov 2020 10:58:12 +0000 MIME-Version: 1.0 Date: Mon, 23 Nov 2020 10:58:07 +0000 From: Marc Zyngier To: Jianyong Wu Subject: Re: [PATCH v15 8/9] doc: add ptp_kvm introduction for arm64 support In-Reply-To: <20201111062211.33144-9-jianyong.wu@arm.com> References: <20201111062211.33144-1-jianyong.wu@arm.com> <20201111062211.33144-9-jianyong.wu@arm.com> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <38fad448a3a465e4c35994ce61f4d8dd@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 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, Andre.Przywara@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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201123_055818_047908_4459DCAA X-CRM114-Status: GOOD ( 23.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark.Rutland@arm.com, justin.he@arm.com, kvm@vger.kernel.org, suzuki.poulose@arm.com, netdev@vger.kernel.org, richardcochran@gmail.com, Steve.Capper@arm.com, linux-kernel@vger.kernel.org, sean.j.christopherson@intel.com, steven.price@arm.com, Andre.Przywara@arm.com, john.stultz@linaro.org, yangbo.lu@nxp.com, pbonzini@redhat.com, tglx@linutronix.de, nd@arm.com, will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-11-11 06:22, Jianyong Wu wrote: > PTP_KVM implementation depends on hypercall using SMCCC. So we > introduce a new SMCCC service ID. This doc explains how does the > ID define and how does PTP_KVM works on arm/arm64. > > Signed-off-by: Jianyong Wu > --- > Documentation/virt/kvm/api.rst | 9 +++++++ > Documentation/virt/kvm/arm/index.rst | 1 + > Documentation/virt/kvm/arm/ptp_kvm.rst | 29 +++++++++++++++++++++ > Documentation/virt/kvm/timekeeping.rst | 35 ++++++++++++++++++++++++++ > 4 files changed, 74 insertions(+) > create mode 100644 Documentation/virt/kvm/arm/ptp_kvm.rst > > diff --git a/Documentation/virt/kvm/api.rst > b/Documentation/virt/kvm/api.rst > index 36d5f1f3c6dd..9843dbcbf770 100644 > --- a/Documentation/virt/kvm/api.rst > +++ b/Documentation/virt/kvm/api.rst > @@ -6391,3 +6391,12 @@ When enabled, KVM will disable paravirtual > features provided to the > guest according to the bits in the KVM_CPUID_FEATURES CPUID leaf > (0x40000001). Otherwise, a guest may use the paravirtual features > regardless of what has actually been exposed through the CPUID leaf. > + > +8.27 KVM_CAP_PTP_KVM > +-------------------- > + > +:Architectures: arm64 > + > +This capability indicates that KVM virtual PTP service is supported in > host. > +It must company with the implementation of KVM virtual PTP service in > host > +so VMM can probe if there is the service in host by checking this > capability. > diff --git a/Documentation/virt/kvm/arm/index.rst > b/Documentation/virt/kvm/arm/index.rst > index 3e2b2aba90fc..78a9b670aafe 100644 > --- a/Documentation/virt/kvm/arm/index.rst > +++ b/Documentation/virt/kvm/arm/index.rst > @@ -10,3 +10,4 @@ ARM > hyp-abi > psci > pvtime > + ptp_kvm > diff --git a/Documentation/virt/kvm/arm/ptp_kvm.rst > b/Documentation/virt/kvm/arm/ptp_kvm.rst > new file mode 100644 > index 000000000000..bb1e6cfefe44 > --- /dev/null > +++ b/Documentation/virt/kvm/arm/ptp_kvm.rst > @@ -0,0 +1,29 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +PTP_KVM support for arm/arm64 > +============================= > + > +PTP_KVM is used for time sync between guest and host in a high > precision. > +It needs to get the wall time and counter value from the host and > transfer these > +to guest via hypercall service. So one more hypercall service has been > added. > + > +This new SMCCC hypercall is defined as: > + > +* ARM_SMCCC_HYP_KVM_PTP_FUNC_ID: 0x86000001 > + > +As both 32 and 64-bits ptp_kvm client should be supported, we choose > SMC32/HVC32 > +calling convention. > + > +ARM_SMCCC_HYP_KVM_PTP_FUNC_ID: > + > + ============= ========== ========== > + Function ID: (uint32) 0x86000001 > + Arguments: (uint32) ARM_PTP_PHY_COUNTER(1) or > ARM_PTP_VIRT_COUNTER(0) > + which indicate acquiring physical > counter or > + virtual counter respectively. > + return value: (uint32) NOT_SUPPORTED(-1) or val0 and val1 > represent > + wall clock time and val2 and val3 > represent > + counter cycle. This needs a lot more description: - Which word contains what part of the data (upper/lower part of the 64bit data) - The endianness of the data returned M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel