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 292FCC5AC7A for ; Fri, 7 Aug 2026 15:42:40 +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=E582xZDvt+4gsNcuth6hcv6sLRoTSurZWsRQ5mdDTfE=; b=Q/kZ0rT9vhOCYl9Zz6F6mBTHNm hdOjde9PigSQQ14SdTmvv+HVS8LepvIUsg1pxz2xVe0S6BGKzbZPgKHuFKd3k/AUbN3W+wNGIzQsU 11TpzfdxZ9eV+y3OXTlHKgJu0OqNTpGIQMx9RFekCsituucLPjr8R68Y0DEbchsyUnoTGnzlSmqDB uqszudmzNLZrDLeG3c4yj3+cIJ0gj0I7wqBAuorGQ3CLKeRbDnxD2fAhBT5zssatwAQaTyk6qTKz/ vRqHI09MlJdSEXLPNE4Cww0s88BHjPt5I27dyaXGF7rKbfVNGgf5ISKrqhJ7IsMgYn0qlX3gW7JME AbxhFuaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wsMiL-00000008MpV-3Aer; Fri, 07 Aug 2026 15:42:29 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wsMiK-00000008MpF-3qJ9 for linux-arm-kernel@lists.infradead.org; Fri, 07 Aug 2026 15:42:28 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id A970B404F5; Fri, 7 Aug 2026 15:42:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B2781F00A3A; Fri, 7 Aug 2026 15:42:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786117348; bh=E582xZDvt+4gsNcuth6hcv6sLRoTSurZWsRQ5mdDTfE=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=fbKUZSLAEE+K/4fea2CIPBaXkUycKN/2PNjz2wULzKmBffAptjyRqGSYjgA/88OQe jpMHpaoffMQKgdFT21SSYdbKvrtRUZ2fnyAjlBEWkPvvRb2cj22qlwvaFwCSv/Ljtk U2XiAytFEKYCBDzxmlOR0KoTjYBpRgOGAQcxP0k8EezCGms6eF1+eI3GfpCPcMRAnh iDDsZdP2WZu5T8CYTWYTTtLoiYt6eq2x3BP5VU07vwDNiFpxHGQ9KMbbMbGWnnJrq2 nQELkZ+bkhoV1Or0mQDWSTgTipkgII/CVNIDPuMbAVVn3DgPqMKuxuFpQybw1kBOdx Fc+B6mMV9gsRA== Received: from sofa.misterjones.org ([185.219.108.64] helo=lobster-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 1wsMiI-0000000DR3X-18fk; Fri, 07 Aug 2026 15:42:26 +0000 Date: Fri, 07 Aug 2026 16:43:47 +0100 Message-ID: <87h5l6os0c.wl-maz@kernel.org> From: Marc Zyngier To: Karl Mehltretter Cc: Wei-Lin Chang , Oliver Upton , Fuad Tabba , Joey Gouly , Steffen Eiden , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org, grayhat@foxmail.com Subject: Re: [PATCH v3] KVM: arm64: nv: Keep the shadow S2 MMUs at fixed addresses In-Reply-To: References: <20260806192451.10169-1-kmehltretter@gmail.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: kmehltretter@gmail.com, weilin.chang@arm.com, oupton@kernel.org, tabba@google.com, joey.gouly@arm.com, seiden@linux.ibm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org, grayhat@foxmail.com 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, 07 Aug 2026 02:13:17 +0100, Karl Mehltretter wrote: > > On Thu, Aug 06, 2026 at 10:54:03PM +0100, Wei-Lin Chang wrote: > > > > Hey sorry for nitpicking once more, I actually like v2 more, as this > > version splits the error handling to two places. Marc's implementation > > [1] is also good, but that requires a twist in kvm_arch_flush_shadow_all(). > > So I'd personally go with v2 (+my suggestions for it :)), but also fine if > > others have other opinions. > > > > I also think the comment in kvm_vcpu_init_nested() is worth adjusting > > slightly, too. > > > > No worries, thanks for taking another look. > > I was following the guidance in include/linux/cleanup.h: > > the expectation is that usage of "goto" and cleanup helpers is never > mixed in the same function. > > But maybe keeping goto is better. I'll wait a bit for others > to comment. The version I proposed in response to your first version had no goto, and trivial error handling. Can we *please* stop the bike shedding and settle on the simplest possible fix? Or *any* fix at all? > > For the comment, I propose replacing the current text with: > > /* > * If allocating an MMU object fails, keep the VNCR page alive so > * that userspace can retry vCPU initialisation without affecting > * the VM. > */ > > Is that the adjustment you had in mind? I don't think we need to change any comment. If anything, it should be deleted altogether. This is a security fix, not a literary exercise. M. -- Jazz isn't dead. It just smells funny.