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 27FE2C761AF for ; Thu, 30 Mar 2023 06:43:58 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7w5U3dV5qI2P0vw9uK4o15HVMMHJFrxCNaSfLNqAPm8=; b=SU4xqZGJNYDHBG bI3duXiPJzIaPPkJSsK5sgUYacatuQn1vKjynOy+t9zYtnRjzwSKZIVwoCm26qRIPxcX+jFGUJ/3E BD+CFSas/6o3XBy7bp6faB5bkt5IjZVJvHCrOXZn8o0li5w9PlMrbLcA+bWlKumWY8ELvuma25L1s eYsfjfwXDyuvETBfEdC+fyHKx0UhWDg0iIXvs6C6Sgge+YchtpTdbjCwSKkht8WV/A5HDqNTliDWR mkkKEjR0dvVtgTw/VoiLsjOYlsTsscaSZ+brPPoAmWOd7z5IktgJN9xXmVQkLgTU33+5fMHuRREnn +gBZ5i7NEWKuhyBMMjOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phlzw-002n7y-1t; Thu, 30 Mar 2023 06:43:00 +0000 Received: from out-31.mta0.migadu.com ([2001:41d0:1004:224b::1f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1phlzs-002n6U-2a for linux-arm-kernel@lists.infradead.org; Thu, 30 Mar 2023 06:42:58 +0000 Date: Thu, 30 Mar 2023 06:42:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1680158572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UUNTmfY0fOvsY7bCYHRcY0CifEjhLb/ZBB0rxOVTkWw=; b=diSsM9vVRakxTDZtGuQYw6QXrbLjEJp1FY2lxYGXXgZJYd2XODjZapKBAQ05I717+/PMmA Sfmsekn6yMOLJWjfEq/9DUrrHY8rgQv96YwNTJLz+ea7Qrcu5yeXXD8Uzzz7uUXhQfx8Ot KHgrDaLYVm+XPEs9Gtr5EtgdMB4vVR8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier 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 , Reiji Watanabe , Colton Lewis , Joey Gouly , dwmw2@infradead.org Subject: Re: [PATCH v3 05/18] KVM: arm64: timers: Allow physical offset without CNTPOFF_EL2 Message-ID: References: <20230324144704.4193635-1-maz@kernel.org> <20230324144704.4193635-6-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230324144704.4193635-6-maz@kernel.org> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230329_234257_103192_8E921173 X-CRM114-Status: GOOD ( 11.41 ) 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 Hey Marc, On Fri, Mar 24, 2023 at 02:46:51PM +0000, Marc Zyngier wrote: > CNTPOFF_EL2 is awesome, but it is mostly vapourware, and no publicly > available implementation has it. So for the common mortals, let's > implement the emulated version of this thing. > > It means trapping accesses to the physical counter and timer, and > emulate some of it as necessary. > > As for CNTPOFF_EL2, nobody sets the offset yet. Did you consider implementing a 'fast' exit handler for counter reads? When I took a stab at this a long time ago I had something similar [*]. Since physical counter emulation is going to effectively be used by all systems out there right now it might be worth giving the best emulation implementation we can. [*]: https://lore.kernel.org/kvmarm/20210916181510.963449-9-oupton@google.com/ -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel