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 0E86A3E16A9; Thu, 18 Jun 2026 09:41:41 +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=1781775704; cv=none; b=W7rP3H6te08E1kd+uuk5rUl0yhiTS4sxGGUMDVXHO2TQVfkQbH5/dOSZU4eBSTRC8d/FDK0jEkg37Io/kue1ffPUXxoJ50+H7cS/KWbxcmJe3rVR4HpN5lU7Yq/p65TOvCgVzlTk24wT2angY3DVnUkpTwdKZVs6Dx2pIy5nMUE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781775704; c=relaxed/simple; bh=EZjkG8WJAKgRP3IbPu3fTxFzjX5+3OFny8h5lnjbxJw=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=T5QolcWgVL8uNHP3+8TBDkze6hWfqy51c0fmwygk0Zukgxx5Nvd/PEUHWunFdCz69yJe7TcXIXI9soq2lY6JVS6G/6NkZxoATUwIYCghGy8QWpfweeUuJ6CTfT9Et32enFRdgpMktLjKccC8XeJqKEullOe2O/ARXt5ZUPweMQs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VuT0NRgX; 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="VuT0NRgX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B11A1F000E9; Thu, 18 Jun 2026 09:41:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781775701; bh=dEyheOPX3uyY3aIcmri2uUD9d+ziikVgCYfP2Q4moWM=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=VuT0NRgXKBjv1CbWFg7NC/qA0CAI6E//20N0p8Sd80YQk433XZX6SGnGrRpcVS4CJ o27YoiEJdg+Cuzbfa+GwTkG2B7UjGX7h8sEOmHSQ6MkVsNH0yFPj0XC5vW+N9vfhta xs7w8Bh/kTkYvdZ2Cmq2vc4ifMTkrVAohITym3+94gF9Ow2h/9jeiqCH+lKlWQkPRP 1QlzBFeCKTQQFYseSPkBZIc9/VDQtuf20X7YQM5d2mW5c5VqIWTU9mi2x6+iuOZZw3 JAYnjvzeL8LlOqG9IwbI2CQu0AhcewTVZ3PNDREZqZyu/JweVQgm2qbHrbwnkTEZE2 RLWoCbXBLr9uA== 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 1wa9Fj-0000000DxBy-30K8; Thu, 18 Jun 2026 09:41:39 +0000 Date: Thu, 18 Jun 2026 10:41:39 +0100 Message-ID: <86ik7grxrg.wl-maz@kernel.org> From: Marc Zyngier To: Fuad Tabba 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: References: <20260612065925.755562-1-tabba@google.com> <20260612065925.755562-4-tabba@google.com> <86jyrwrymb.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) 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 Thu, 18 Jun 2026 10:24:55 +0100, Fuad Tabba wrote: > > On Thu, 18 Jun 2026 at 10:23, Marc Zyngier wrote: > > > > 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. > > I understand what you mean. Would you like me to drop all of the guard > patches, or only those that go beyond the code changed in this series? The latter. I'm fine with conversion that happens while the code is being reworked. Thanks, M. -- Without deviation from the norm, progress is not possible.