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 3184ECD98E2 for ; Thu, 18 Jun 2026 09:23:19 +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=p35E1mIrhFruMk9fAgHFYQp6iWDdwjql9lvHDZh45to=; b=zeMR7fHOEQwwSG+jzxIkgYKuS2 UfxphFEqS5UmAeWNncEMC3HBcQ07CCWJlcuM+eM7aKd3TnpI6kFQTMsPI2uPsiil4kJi46enuplXA OSP0TBSBzeItjAAcpeTyRQEpjVpFgwPIF48uCmMYU/Btu6vHGkbzkBeDgAfGVL9V89N/ZjrS302LG 2QW2tksElbHpirf2xjpmpKP1Wqei3Q37VLYH0UrUSDV+QPavurB8XzB0Ztx22dIMT2F8r85+ofLDb BGLzW2iIpWazrirxh6vpoi7ThL2O/kozJWIzEJl0zVS1BKVRv1Yj94I1cTQL2mTY6M8UJkkO9Ydg2 4+PPZb3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wa8xt-00000000wFH-0izt; Thu, 18 Jun 2026 09:23:13 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wa8xr-00000000wEa-2v4M for linux-arm-kernel@lists.infradead.org; Thu, 18 Jun 2026 09:23:11 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 26D036012A; Thu, 18 Jun 2026 09:23:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEBBD1F000E9; Thu, 18 Jun 2026 09:23:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781774590; bh=p35E1mIrhFruMk9fAgHFYQp6iWDdwjql9lvHDZh45to=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=mV21I0MuV4Kuknp46y4dXXGvTPSP/xbcaV2SupW1mqhRoGvL3CYAxm9JVADHPf+G1 IB7dcvO7ItwI4IW0IH5/Qy3IYqAQ1l4RU2+kT/PC1173Wehkqb3CCZ9YsRN9O88mUJ IZBlrEm6NI8kud373RnTldDs7ZNP4E+dU1N3GHkIrnX1FbREv88l4fEGtshnOd4LVM jYPrWOT2n7mAtzV8CbApM5d2D9ta26cbPPUaAlvLoBjckDM6uY24jArFFaNgT+5Mmb rt6LY8WbJk2o1FLxREb43//DJRJNMQnA7muyLAcr+/ElFH3q/pdga0K1qmtKLakxVx pVtL1OMUGQY9Q== Received: from sofa.misterjones.org ([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 1wa8xo-0000000DwiE-3bcI; Thu, 18 Jun 2026 09:23:08 +0000 Date: Thu, 18 Jun 2026 10:23:08 +0100 Message-ID: <86jyrwrymb.wl-maz@kernel.org> From: Marc Zyngier To: tabba@google.com Cc: Oliver Upton , Will Deacon , Catalin Marinas , Quentin Perret , Vincent Donnefort , Sebastian Ene , Per Larsen , Suzuki K Poulose , Zenghui Yu , Joey Gouly , Steffen Eiden , Mark Rutland , Jonathan Cameron , Hyunwoo Kim , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 03/11] KVM: arm64: Use guard()/scoped_guard() in arm64 KVM EL1 code In-Reply-To: <20260612065925.755562-4-tabba@google.com> References: <20260612065925.755562-1-tabba@google.com> <20260612065925.755562-4-tabba@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: tabba@google.com, oupton@kernel.org, will@kernel.org, catalin.marinas@arm.com, qperret@google.com, vdonnefort@google.com, sebastianene@google.com, perlarsen@google.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, joey.gouly@arm.com, seiden@linux.ibm.com, mark.rutland@arm.com, jonathan.cameron@huawei.com, imv4bel@gmail.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@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-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 Fri, 12 Jun 2026 07:59:17 +0100, tabba@google.com wrote: > > Convert the manual mutex_lock()/spin_lock() pairs in > arch/arm64/kvm/{pkvm,arm,mmu,reset,psci}.c to guard(mutex), > guard(spinlock) and scoped_guard(), dropping unlock-only goto labels in > favour of direct returns. Centralised cleanup gotos that still serve > other resources are preserved. > > reset.c uses scoped_guard() rather than guard() so the lock covers only > the small read/update window inside kvm_reset_vcpu(), leaving the rest > of the function outside the critical section. To be brutally honest, I don't think this sort of widespread changes bring us anything. This is just churn. Sure, if you are reworking a particular bit of code that is goto-heavy for the purpose of error handling, this has the potential to cleanup the code *while you are changing it*. But doing it for the sake of doing it? I think we have bigger fish to fry right now. M. -- Without deviation from the norm, progress is not possible.