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 0CE4AC3DA4A for ; Fri, 16 Aug 2024 10:21:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type: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=BOmRkEE0QtP73VTNCozmtxdp80rOc+NAOoVsrS+uR9o=; b=UPWREqSPliXF9fcNvDK7jIiOIS 2ZY/oQ3YIIlyf/RN2TizDxRTxl5yZtqJSmAM+pyWevIlee5I4/VyoWxo1eqEdTHPQMelmTBInuOtR K47sC2J624ap4zlyqbeGMfDJNMNlkMvwYKmR7WDDnBNnxUE337VaEVQIXVUR/4QS+55+OsGyHe+Ze +e4fL1yDy6yWc0/DmKksyjGrWfwYWA5ctpliFsxzsLd8usUblo5BZAyqFJ6Mi1wtTsrQf/v7K5UEv l5rsvrvebPsSWnBbjJsbBhu81fOxtJMMLhGC/80SOVALE8+KSKpzJ5YD3McwQm9mvoTA90dCGnb2H +6YRIaJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1seu4k-0000000CZgZ-22cT; Fri, 16 Aug 2024 10:20:54 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1seu43-0000000CZUI-2gWW for linux-arm-kernel@lists.infradead.org; Fri, 16 Aug 2024 10:20:14 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id B0894CE1F35; Fri, 16 Aug 2024 10:20:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCCAAC32782; Fri, 16 Aug 2024 10:20:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723803609; bh=SwHCohTBQUcDIF5mxQ5zHEduQIWGLFjG7Q6hpmFYUHM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kbu+hi4slB2zw99p6innm07sQrK7u2X1OX2flhARUGK4a8ssz8qtnGRvIM6EuzzvS 5hlQmRsCg/rm2E0wnTwiGYK05ltFv7t0woc6JybMLpBZ5QV/XqDyx8QT9s/Jsju4i2 OQrPNGBLCgeHyhGLcqv4i1ELI/OoaSCg9Aa47zBe7BprwcxKVCiQ6Z+7A5gNtrcEuP XDAcYLYTf5Tv0NA/bxodzdAul8bhKXWg6Tz14FzSn82izBUDMJHFIfLIfCtS3R69PT wCjbPaka+cX6N1IV2hgsda6JvzLB2CitwUi3WrIXZRowvAM0QSQiJ6hr699a1HxAOo LSTfYhxjYaIOg== Date: Fri, 16 Aug 2024 11:20:04 +0100 From: Will Deacon To: Peter Collingbourne Cc: Catalin Marinas , Marc Zyngier , linux-arm-kernel@lists.infradead.org, Yichao Yu , Robert O'Callahan , Keno Fischer Subject: Re: [PATCH v2] arm64: Implement prctl(PR_{G,S}ET_TSC) Message-ID: <20240816102004.GA23304@willie-the-truck> References: <20240517212553.3597611-1-pcc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240816_032011_878381_CA4049F1 X-CRM114-Status: GOOD ( 12.92 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Peter, On Mon, Jun 10, 2024 at 01:24:51PM -0700, Peter Collingbourne wrote: > On Fri, May 17, 2024 at 2:25 PM Peter Collingbourne wrote: > > > > On arm64, this prctl controls access to CNTVCT_EL0, CNTVCTSS_EL0 and > > CNTFRQ_EL0 via CNTKCTL_EL1.EL0VCTEN. Since this bit is also used to > > implement various erratum workarounds, check whether the CPU needs > > a workaround whenever we potentially need to change it. > > Ping. Chatting with Marc and Catalin about this, we're a little uneasy about exposing a prctl() for this. Ptrace does seem like a much better fit. Can you add a new regset for the counter instead? Will