From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C76E2E7373; Thu, 18 Jun 2026 09:23:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781774592; cv=none; b=sUt+fR167rSNR9DJzlsDIYIVXNMrBzSUKiDVP6SfufnAiYCZQ2zCOxIwn/zzd4Bvm7V1ZyVBU7H3wXpCJc3QcmDj+MV1wv5ooV41beXE4M2JSEjzun4V0DbCbO2stf9QywIfZyYFqZWHmw2iUAV875gx6+EXh2qH083NgcJYgiI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781774592; c=relaxed/simple; bh=UR1nPFd3k/0uIQvvwLZpmSzSdZlNHJ2b8Wl3kFrei90=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=kSPrDXRptZdyU7rvgJSCiYzS4fJpWdhhUgncgS+PoJSTS0adJ9BgE3fNzp6V/FlFTL1tDDkv3dDzC4EygXS1AnYQcT1NGLuYqIOgOnFkXcq2ptnXw+Utc8W/vUf/zIJi7UAVdTkGwC0UkvJtp+3o9Ud4JHXljkVjMlhFCQ2VJR4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mV21I0Mu; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mV21I0Mu" 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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.