From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEC0217A309 for ; Fri, 7 Aug 2026 01:13:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786065204; cv=none; b=NmgLFCtANyqC7NLtRMaxveJvWktOCcFJ6exiNG7U65FuaVdszTrPnHqqLYA0Y6uxW3xE8WJD3cd0V7FyBBrNj1G8JQUvm9h8agji6OkEBRFK2ZzTp4/Ea55d8qclFL49dexLq4Fe3ymXM1Yw00czuaNwx11JniP53oT46Lsed80= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786065204; c=relaxed/simple; bh=SIIgJPGFhz5hNnkc11W1Z33TkabJ2YrobQTf7snc4jY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=clA/lm0kQkYk8K59dv7cE7fAMGzDv6ZCimpQQKYegTzSjAS2+6H/DBbL1HXARoxtA772/TtM637gTFMuI0vGmN1pj2K/G8aeVQsD/F995s3Rr6J369lvob9lXWq2oDOPRtoeDdKjfsfPw73hJIp2Xi/6Hm8Rb0WfvRFtE5m9zVE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JW+YmbUQ; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JW+YmbUQ" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-498028b3d5eso27783675e9.1 for ; Thu, 06 Aug 2026 18:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786065201; x=1786670001; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=JhTAK8kd+tCRfVOm3LmowAQ3BoIBHWxZmJ5DLNOQvkM=; b=JW+YmbUQCMwBJxhsL3m/F307VuGJDQN/a6tRNTgNSJv/2O490v6PlRHBdsh8jVPgfN dFyqdsZOQ//9m9Tlyf2e4cqWPYpE3Vja3/eGXdv6Q0u6CK6KvjKJdvJTnaQSSKgKmCua TB1bIFecVICp4rWRlIHuXzxc9byV7+rUC0OIBWLZC09ujDOTbd+DBp/GKMh4Y9h7SMuL QTo8erTr9wHPAKEX58KNglYvapNs1rQKwFo50hiqWKAF0DIJNlCF0PzsCySmwi1pLQds WgvIrExJWkxbhMs4C8noLJaIC2UqZxjX+1CFHizbkQqy3roKHUa/xysHW8p8LdKwRkFi AZsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786065201; x=1786670001; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JhTAK8kd+tCRfVOm3LmowAQ3BoIBHWxZmJ5DLNOQvkM=; b=MjKcp0Mu1X2Lzo4hvKCtpAZ5G/kfCb+Zc0ijNvBbJphOkXOi/DC3iUM2WFASwqGlKp T2cbo0Ecrn/ZKP19nP4/4Hw5q4lEC5FysPquqpGbn7iK0q49utlXCjFZrB2ulMuRlsUk z3guvLxwExLQtqRcx7c6ZnCFSWqvVmNVyl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mMXyf1cY51uJ2bIfJoN3cayhs4Hwr2KsquKo zz6awxjw= X-Received: by 2002:a05:600c:1f96:b0:496:c249:dd9a with SMTP id 5b1f17b1804b1-4994e71364fmr228063365e9.3.1786065200908; Thu, 06 Aug 2026 18:13:20 -0700 (PDT) Received: from unknown748F3CBA5068 (dynamic-2a02-3100-adf9-2301-8c14-6be6-a9e6-a2d4.310.pool.telefonica.de. [2a02:3100:adf9:2301:8c14:6be6:a9e6:a2d4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4995c8bcca6sm13771385e9.4.2026.08.06.18.13.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2026 18:13:20 -0700 (PDT) Date: Fri, 7 Aug 2026 03:13:17 +0200 From: Karl Mehltretter To: Wei-Lin Chang Cc: Marc Zyngier , 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 Message-ID: References: <20260806192451.10169-1-kmehltretter@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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. 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? Thanks, Karl