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 DF8AEC3600C for ; Thu, 3 Apr 2025 18:05:40 +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:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=z96XyB/PV9wGjHJsHGM84BTq3aFWcto9BXeE0RoCV3o=; b=dXsoTmazkYfSF83AxdP5D+W60F FUA5ElwGaaYiY/+D0rGv38BZXqJVqfe664fh9rHbBfTWGhYWzU+3so3w84usoyqTli1kH4ijHwl/T MFO7Zkb/lklYMIdNyXfycVe1mToXOnbxMin1tNXzdp6w4gCqZRkZBSpfRSe66ihL3doiQfnaIz91P PabS1fWCuyPdw3oFL2pM6YC4dAANpETXBaizLmOmgt2L9ni6qqoQkYQyHrzhygR/kASRHmJqpxtfN 6jpXlemgUfIUUfGelVByFbgBdtIB9f4EyTLXfo7leUztWweGjDkt6NjxMXtIEPeUjFXHvQTiGQ4vm L16fveqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1u0OwU-00000009WgM-2y9u; Thu, 03 Apr 2025 18:05:30 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1u0Oqv-00000009W4t-1TAA for linux-arm-kernel@lists.infradead.org; Thu, 03 Apr 2025 17:59:46 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 46B57446F7; Thu, 3 Apr 2025 17:59:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9765DC4CEE3; Thu, 3 Apr 2025 17:59:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743703184; bh=u4uBLvKcZDtXzM4whjtNyxhNgE6BnlY7nR+h63ZqcD8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=G0Qmmlyigjizi2H/AnHP4w56K7NJ7gb9sO5WSVqeefPCtJqwGMvsY87S1d7RCNVSg Ia8u9mQXOR+06aESkVHsnMxyePthINhCAxYXHvtYj9ZWQ583ltgJnfI37gwg+yG+hw bv0T2MoUXNWYCaQ5mdp3+xeP8/UEDkfvOu7c4myR5xHy9KptzsinjE0Hoqspuis5DC mDpvIRl0DsolBk0e1F/d92DMll5lziPIQLorIZfUQ9TqHW5fQxgnTAJzbGaj85jKsX W8S7OYrOMWVmg7/eMLzmXfS3Zg07ogF9FNDjp/e4lMMdCTfCLabJkb66/QmBO4YDV2 av2HP0RewHNIw== Received: from sofa.misterjones.org ([185.219.108.64] helo=lobster-girl.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 1u0Oqs-0022UN-8c; Thu, 03 Apr 2025 18:59:42 +0100 Date: Thu, 03 Apr 2025 18:59:44 +0100 Message-ID: <871pu9yvlb.wl-maz@kernel.org> From: Marc Zyngier To: Breno Leitao Cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, arnd@arndb.de, kernel-team@meta.com, vincenzo.frascino@arm.com, anders.roxell@linaro.org, ndecarli@meta.com, rmikey@meta.com Subject: Re: [PATCH RFC] arm64: vdso: Use __arch_counter_get_cntvct() In-Reply-To: References: <20250402-arm-vdso-v1-1-2e7a12d75107@debian.org> <87a58yz0cm.wl-maz@kernel.org> <878qoiyzic.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/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: leitao@debian.org, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, arnd@arndb.de, kernel-team@meta.com, vincenzo.frascino@arm.com, anders.roxell@linaro.org, ndecarli@meta.com, rmikey@meta.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-20250403_105945_406954_431824EA X-CRM114-Status: GOOD ( 14.19 ) 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 On Thu, 03 Apr 2025 13:14:49 +0100, Breno Leitao wrote: > > Since you created *all* this noise regarding instruction ordering, can > I pick your brain in the same topic? :-P > > If my machine has Speculation Barrier (sb)[1] support, is it a good > replacement for `isb` ? Do you happen to know? Probably not. SB prevent speculation past it, while ISB is here to enforce ordering. We're pretty happy to let the CPU speculate the counter, as long as it does it the order we have defined. On some implementation, this can be have a similar effect (drain the fetch queue, restart). But the intent clearly isn't the same, and some implementations may do things differently. In any case, what you want is CNTVCTSS_EL0 (part of FEAT_ECV), which does away with all barriers. M. -- Jazz isn't dead. It just smells funny.