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 101A9CD98E2 for ; Thu, 18 Jun 2026 09:41:51 +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=dEyheOPX3uyY3aIcmri2uUD9d+ziikVgCYfP2Q4moWM=; b=Wuij4N6sKos9moFD2m0t/1bHQ+ hnCZdrLFJaPZ+qRFbkcrjZ9K6d7LPrzNpRAZTAJVqJxvTX4CRezCarJhTnSy2lU0LoTuua5n97EL6 KnCR7vvczJWN8s3iwUvjfF7DIpfIXiS8R6VvJjKjSFnwiYCOCN+/2rfdev+4MZ7CRe5+pv0dWBfh+ KJxydCMtsykwaCuC7ZcIN+/GqOYovSlAhEWzjK14tub5lMkXT5N0CYpoi/eqkrtMQSiTFSfxqhXz4 Ugf0VLjaPK74JNQesGoPwdMCvEzDINAWM/mNKxMDERuvPFq12V7tM9joYcT6mPb32tYkX8/DcZpu0 AtdK222Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wa9Fo-00000000zhK-0E5V; Thu, 18 Jun 2026 09:41:44 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wa9Fm-00000000zh0-23QN for linux-arm-kernel@lists.infradead.org; Thu, 18 Jun 2026 09:41:42 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id E70C1601E0; Thu, 18 Jun 2026 09:41:41 +0000 (UTC) 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) 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 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.