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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 447B6C433E1 for ; Tue, 18 Aug 2020 14:42:29 +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 11F21207DA for ; Tue, 18 Aug 2020 14:42:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HpWvXtOT"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="AOCKY6z/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11F21207DA 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=dwSMe43ynxPd9CnW7I8I06Gd33AYnVCqYgL+jLs40a4=; b=HpWvXtOTwB+BtJbUIcYIDjO2B iz7wTjsz36M+cB4ZbB+v3rv74FPApB8r85VyrmzUK6xGROcp45EoGWIhsIBsOwNQGIKx5nPVFmddN 45gG5H4LM15EV2Qc4yt2kEJgTHbB+CvNU4XoQ9NWpNaIdiyNoG+dzY+tDpld7WbfoJXIUP6suPWxz jgd7eLc6nS0+5zThbfGH/5a7F7E4zem/Ua4BRSrrpxVTUSL2JQ/WBEssc5yP2KTXGrCC4rtEruGuZ 0ncbNyeEj0W9LSJ9sQGfit22pSf+OQ11Ob39S/G4wlyzS1S+TX4Qxnxe1l6la+gtOWXALPMouf4IV xbxXxZDdQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k82nT-0000jM-Ej; Tue, 18 Aug 2020 14:41:07 +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 1k82nQ-0000i4-CO for linux-arm-kernel@lists.infradead.org; Tue, 18 Aug 2020 14:41:05 +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 70C852083B; Tue, 18 Aug 2020 14:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597761663; bh=bJPOt4B5MgpMDT2n+zzNZ+rE9AaQj654FX1OxJw6sDk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AOCKY6z/atNldeFw82NlnljvDaIkZ1FqC+aSBMu3yFXm9qvkAyP1Gs4olwzL0n+JN KtfqIK08IDgo0RkpYl8PMbUn6s3DUAhVyXc/EQOmH1F+zB4VF2sIxTbf7BWv2kFOUi VkiNd596tsEYNkhmbOs65QaPxRz3BbwlGWmAiHAI= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k82nN-003vcz-O3; Tue, 18 Aug 2020 15:41:01 +0100 MIME-Version: 1.0 Date: Tue, 18 Aug 2020 15:41:01 +0100 From: Marc Zyngier To: Keqian Zhu Subject: Re: [RFC PATCH 0/5] KVM: arm64: Add pvtime LPT support In-Reply-To: <20200817084110.2672-1-zhukeqian1@huawei.com> References: <20200817084110.2672-1-zhukeqian1@huawei.com> User-Agent: Roundcube Webmail/1.4.7 Message-ID: <8308f52e4c906cad710575724f9e3855@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: zhukeqian1@huawei.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, steven.price@arm.com, catalin.marinas@arm.com, will@kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, wanghaibin.wang@huawei.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-20200818_104104_568409_A69BAF09 X-CRM114-Status: GOOD ( 20.73 ) 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: kvm@vger.kernel.org, Suzuki K Poulose , Catalin Marinas , linux-kernel@vger.kernel.org, Steven Price , James Morse , wanghaibin.wang@huawei.com, Will Deacon , 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-08-17 09:41, Keqian Zhu wrote: > Hi all, > > This patch series picks up the LPT pvtime feature originally developed > by Steven Price: https://patchwork.kernel.org/cover/10726499/ > > Backgroud: > > There is demand for cross-platform migration, which means we have to > solve different CPU features and arch counter frequency between hosts. > This patch series can solve the latter problem. > > About LPT: > > This implements support for Live Physical Time (LPT) which provides the > guest with a method to derive a stable counter of time during which the > guest is executing even when the guest is being migrated between hosts > with different physical counter frequencies. > > Changes on Steven Price's work: > 1. LPT structure: use symmatical semantics of scale multiplier, and use > fraction bits instead of "shift" to make everything clear. > 2. Structure allocation: host kernel does not allocates the LPT > structure, > instead it is allocated by userspace through VM attributes. The > save/restore > functionality can be removed. > 3. Since LPT structure just need update once for each guest run, add a > flag to > indicate the update status. This has two benifits: 1) avoid multiple > update > by each vCPUs. 2) If the update flag is not set, then return NOT > SUPPORT for > coressponding guest HVC call. > 4. Add VM device attributes interface for userspace configuration. > 5. Add a base LPT read/write layer to reduce code. > 6. Support ptimer scaling. > 7. Support timer event stream translation. > > Things need concern: > 1. https://developer.arm.com/docs/den0057/a needs update. LPT was explicitly removed from the spec because it doesn't really solve the problem, specially for the firmware: EFI knows nothing about this, for example. How is it going to work? Also, nobody was ever able to explain how this would work for nested virt. ARMv8.4 and ARMv8.6 have the feature set that is required to solve this problem without adding more PV to the kernel. 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