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 BE2CE3F4125; Fri, 7 Aug 2026 15:42:28 +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=1786117349; cv=none; b=nfLgUS/h11D50nodAhpyrccIdF+g7atx9g7RDjKPdqAiwUZVerDMZEKPcKARZD8CRuMcNKeCIWNIgbRRDM/dss9o1rnozDI1Squ+pbFxjcoKDS/yBqIT3TetiQS61dkS4jgVMf3tRKJ6VPSOgAIL2FPnEaacEiOQwnT0g+1HjFA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786117349; c=relaxed/simple; bh=rCEqMV+uPIsth9n1E1JQC2j8NZuXu4XTM3VkXsyPAZI=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=TV0+dAl7+djp5Ttf85ZveIHUTmRD3etrdwuodnCUhfe0cigg9x8ent2xhg2/8BlptETz6DhcbRSGwiDm9rHunwrGNmN/Zyff23ASiXeXLa6ZvJfrEo4chm4yWp+LquUa7c5aQYFEfxgNw8bmIF8WAeBj8Cyv5aqZVF+5Kl/ki2w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fbKUZSLA; 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="fbKUZSLA" 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) 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: 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 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.