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 CAFF0EB48EC for ; Thu, 12 Feb 2026 09:08:05 +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=M3rRBPh1NU1rz28xZUR6Fl9Vl+cGy/NzeVFSpVgXAxg=; b=lYWFNHcKtcZizWf+bjJcNiDSCJ PeWHp/IvjqQbkRJl4Hl9jxa6hvt6z2D40lodWdZgsPLX4/lMH+OgseKWVx18yw2DKjp4bVuvPEIvi FaNKrLhINDDKwzSWg+wxafxcbLRPWkPxAP0QuuRzWiMYA6kw9lQu24U5AA3gwT1dJYodIWypih7xf jxh3TCNCw3vOWYMgFSPYpHi+45TIdK7CPmKxX/BAqB/xb3sTumvXEKFJqeglYgCTR18+X70eyTA4e AOvA42U65ztg7VyIPOn4eNwB6PN8Ypk4cY2pmjCV4eK/qzwzzzgzbEf/2QtyPKfZKpSEBf4SLa5qx V8F6QSrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vqSg1-00000001oOc-1VS9; Thu, 12 Feb 2026 09:07:57 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vqSfz-00000001oOH-034H for linux-arm-kernel@lists.infradead.org; Thu, 12 Feb 2026 09:07:56 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 3BE4144031; Thu, 12 Feb 2026 09:07:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1428BC4CEF7; Thu, 12 Feb 2026 09:07:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770887274; bh=7X/ZE+464SFMrcWXG+fw9L92P1t1gtPIejSOE1mm8Sg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SRDzJd4y7pdwghuIRwEX+milR/vWqoeZRao4cczsY/oRSB7rXxGuJLbC8pO7iCSw4 /1fHpKlD9QC8Pr36ty9iBxiTNpXaDNYp9kxfY175hoKc70tInFruadKyuacdByotDw giDuJK9Yv4AbMPDUN5IleiHk09y0vDFg4IFOf1Va0BfXrwqu9s3EcPhdfYle0DOYSg Po0zabmL17OlVZC5nq6r8y/4vDgWU5l1/ykpkYYbjQp+nF7oNrOcToyCcJwcrWAWRT TlUDUSJIbuvgS7XUw4PVNj+qOU1x9wo3jckCVZzmRgQeTQjpQnhNQht/dATAuEMT5X Wv6weRnqIFc7A== Received: from [185.219.108.64] (helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vqSfv-0000000AYzI-2Zos; Thu, 12 Feb 2026 09:07:51 +0000 Date: Thu, 12 Feb 2026 09:07:33 +0000 Message-ID: <86ldgyba96.wl-maz@kernel.org> From: Marc Zyngier To: Colton Lewis Cc: kvm@vger.kernel.org, Alexandru Elisei , Paolo Bonzini , Jonathan Corbet , Russell King , Catalin Marinas , Will Deacon , Oliver Upton , Mingwei Zhang , Joey Gouly , Suzuki K Poulose , Zenghui Yu , Mark Rutland , Shuah Khan , Ganapatrao Kulkarni , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-perf-users@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v6 09/19] KVM: arm64: Write fast path PMU register handlers In-Reply-To: <20260209221414.2169465-10-coltonlewis@google.com> References: <20260209221414.2169465-1-coltonlewis@google.com> <20260209221414.2169465-10-coltonlewis@google.com> 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: coltonlewis@google.com, kvm@vger.kernel.org, alexandru.elisei@arm.com, pbonzini@redhat.com, corbet@lwn.net, linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, oliver.upton@linux.dev, mizhang@google.com, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, mark.rutland@arm.com, shuah@kernel.org, gankulkarni@os.amperecomputing.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-perf-users@vger.kernel.org, linux-kselftest@vger.kernel.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-20260212_010755_145106_297AB5D8 X-CRM114-Status: GOOD ( 16.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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 09 Feb 2026 22:14:04 +0000, Colton Lewis wrote: > > We may want a partitioned PMU but not have FEAT_FGT to untrap the > specific registers that would normally be untrapped. Add a handler for > those registers in the fast path so we can still get a performance > boost from partitioning. > > The idea is to handle traps for all the PMU registers quickly by > writing directly to the hardware when possible instead of hooking into > the emulated vPMU as the standard handlers in sys_regs.c do. This seems extremely premature. My assumption is that PMU traps are rare, and that doing a full exit should be acceptable. Until you demonstrate the contrary, I don't want this sort of massive bloat in the most performance-critical path. "Start walking before you try to run". M. -- Without deviation from the norm, progress is not possible.