From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5AC22F36 for ; Thu, 9 Mar 2023 08:29:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8788DC433EF; Thu, 9 Mar 2023 08:29:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678350569; bh=2k4s+7q61F9IqFit/joyuBMQsl0m6FGsMAJf9S5C2g4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uLVYAaIlDqCLGBls+WcHrQXa38GbCLAP2NAYgDd+ecIFrm6PEjfQmKGkbmjWj3de2 oq8nclAy1QzsEzfTx9EKIhppYyJUHw7o6mGItng40474B4ZDJ4/+hxsD3eF28se2/Z q4PV8U/Jryyv/5csR+cblrWy5zaq6UUafojgdM3c27zTi79IO9BtNHV1OcK2T5zkMn sQGtYbJ5+Rk4e0jN/Lod+nHcomc2x5E6yTusyiJ0aRK0bcEaHKdQLQut/h0/kG/0KN /x9hPdjAc2f6w+u0vPyS+CqT7xp5ZHTAXdzPB/OgEb2/6K4F/BR70Lm3x/60MTgf9U WUovdJzXbCYnw== Received: from 82-132-236-50.dab.02.net ([82.132.236.50] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1paBeQ-00GFIV-T6; Thu, 09 Mar 2023 08:29:27 +0000 Date: Thu, 09 Mar 2023 08:29:24 +0000 Message-ID: <87cz5i9vkr.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse , Suzuki K Poulose , Zenghui Yu , Ricardo Koller , Simon Veith , dwmw2@infradead.org Subject: Re: [PATCH 08/16] KVM: arm64: timers: Allow userspace to set the counter offsets In-Reply-To: References: <20230216142123.2638675-1-maz@kernel.org> <20230216142123.2638675-9-maz@kernel.org> <86k00gy4so.wl-maz@kernel.org> <86bkllyku2.wl-maz@kernel.org> <867cw8xmq2.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 82.132.236.50 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, ricarkol@google.com, sveith@amazon.de, dwmw2@infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Wed, 08 Mar 2023 07:53:46 +0000, Oliver Upton wrote: > > > I certainly agree that (2a) is highly desirable to get existing VMMs to > > 'do the right thing' for free. Playing devil's advocate, would this not > > also break the tracing example you've given of correlating timestamps > > between the host and guest? I wouldn't expect a userspace + VM tracing > > contraption to live migrate but restoring from a snapshot seems > > plausible. > > The problem I'm alluding to here is that the VMM will save/restore > the physical counter value and cause KVM to offset the physical counter. > Live migration is a pretty obvious example, but resuming from a snapshot > after resetting a system be similarly affected. My take on this is that if you have produced the snapshot on a pre-CNTPCT host, there will be no change in behaviour. If you've produced the snapshot on a new host, you get the new behaviour. I am willing to be accommodating to the use case, but only to a certain extent! ;-) M. -- Without deviation from the norm, progress is not possible. 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01D2FC64EC4 for ; Thu, 9 Mar 2023 09:31:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XAySYyLfzeXTb919g04W/Sb0MA3a500AmTUh2aorKws=; b=0wDNWMv0BkyaL5 KxNNc08QwkzQQCnljKdcl8YWQgUehye/DubjTaJkYDT2V0cvzslcebD4lDBsxtfoVO6JJRNvDRrKy W86ZDYiWNT6iuoKGLxK/RhsPHYcUobw8+3bWFUPTDqorsHueXZiZmCUbiQEwypCCjNF8+gLNnNC7u ALgthp13a7u2c5dc9Q0QXhrtAcVo1uYY1YB/HIe093qJahkC41ejk57+3RUWViT0IlKZX1U2X32DQ K88wzjNEzVUPWvYD95KPF1fLmry9c67gRbTXqQRV7Uof47NCLPyMHa2GZMzBlDG3fvxmf2uXyl+dd 1CWMLWEg1Vo14YAErOdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1paCc7-008nwQ-2s; Thu, 09 Mar 2023 09:31:07 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1paBer-008WR8-LP for linux-arm-kernel@bombadil.infradead.org; Thu, 09 Mar 2023 08:29:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Yq5CXp0EddTLivwMOBnfONT4CJUbV57hxOg2cMHy0Og=; b=ZlXmQYkVRYQxSrRkUHODsO+5g6 RU66X/TcjVILo+bX9uV2J66Rzt1HhI9wdS1/786YH/9cyqkWe7MeKBb74GrrcvJ5heMCHdYziLsY7 WQzgnTNXhxVY6ZKMQR+DtbV7zngFFrPoo8/fZXauorVxwR8ChTou56m3j8NwZrlzGcj0lXbcvNYV9 dvxawiL4i2zYgoZdbHLEdiOqfjGFxpi5Ug8yKOll88m70gOXXd98j4iREL6QdBkO/bsweDOt8iVvH 3palaGqhnHtZq0WxIMt4d2YTi4PSDyV2zjVCcN3dvWzbhBgSEJoXHpY5j3LXUEcCaXRyq8ghEENTQ 9NzyYknA==; Received: from ams.source.kernel.org ([145.40.68.75]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1paBeb-00032a-0x for linux-arm-kernel@lists.infradead.org; Thu, 09 Mar 2023 08:29:44 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C44FDB819EE; Thu, 9 Mar 2023 08:29:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8788DC433EF; Thu, 9 Mar 2023 08:29:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678350569; bh=2k4s+7q61F9IqFit/joyuBMQsl0m6FGsMAJf9S5C2g4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uLVYAaIlDqCLGBls+WcHrQXa38GbCLAP2NAYgDd+ecIFrm6PEjfQmKGkbmjWj3de2 oq8nclAy1QzsEzfTx9EKIhppYyJUHw7o6mGItng40474B4ZDJ4/+hxsD3eF28se2/Z q4PV8U/Jryyv/5csR+cblrWy5zaq6UUafojgdM3c27zTi79IO9BtNHV1OcK2T5zkMn sQGtYbJ5+Rk4e0jN/Lod+nHcomc2x5E6yTusyiJ0aRK0bcEaHKdQLQut/h0/kG/0KN /x9hPdjAc2f6w+u0vPyS+CqT7xp5ZHTAXdzPB/OgEb2/6K4F/BR70Lm3x/60MTgf9U WUovdJzXbCYnw== Received: from 82-132-236-50.dab.02.net ([82.132.236.50] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1paBeQ-00GFIV-T6; Thu, 09 Mar 2023 08:29:27 +0000 Date: Thu, 09 Mar 2023 08:29:24 +0000 Message-ID: <87cz5i9vkr.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse , Suzuki K Poulose , Zenghui Yu , Ricardo Koller , Simon Veith , dwmw2@infradead.org Subject: Re: [PATCH 08/16] KVM: arm64: timers: Allow userspace to set the counter offsets In-Reply-To: References: <20230216142123.2638675-1-maz@kernel.org> <20230216142123.2638675-9-maz@kernel.org> <86k00gy4so.wl-maz@kernel.org> <86bkllyku2.wl-maz@kernel.org> <867cw8xmq2.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 82.132.236.50 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, ricarkol@google.com, sveith@amazon.de, dwmw2@infradead.org 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-20230309_082942_647092_942F70BB X-CRM114-Status: GOOD ( 19.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 08 Mar 2023 07:53:46 +0000, Oliver Upton wrote: > > > I certainly agree that (2a) is highly desirable to get existing VMMs to > > 'do the right thing' for free. Playing devil's advocate, would this not > > also break the tracing example you've given of correlating timestamps > > between the host and guest? I wouldn't expect a userspace + VM tracing > > contraption to live migrate but restoring from a snapshot seems > > plausible. > > The problem I'm alluding to here is that the VMM will save/restore > the physical counter value and cause KVM to offset the physical counter. > Live migration is a pretty obvious example, but resuming from a snapshot > after resetting a system be similarly affected. My take on this is that if you have produced the snapshot on a pre-CNTPCT host, there will be no change in behaviour. If you've produced the snapshot on a new host, you get the new behaviour. I am willing to be accommodating to the use case, but only to a certain extent! ;-) M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel