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 63E6D499F26; Fri, 4 Sep 2026 13:10:39 +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=1788527440; cv=none; b=tsM9QnqJv3GQpOfNu9x6NsqRt+oFMafMEQDp5BEp6nTQS7xaMbHCwZspnyppc3bhTZl7LxNU+j7uYdBlEQ1JAEh6YODDuxG4cZG5hibDkvhhEq9AuSL3EKjfRTUcBHYWEMiFmnluyRoVxJpfyCYG7OucZeomakQRaKs0iWBk5r0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788527440; c=relaxed/simple; bh=kWpS3GfVRBov4nZ2s8TPAJfSuGxD2LXU9ri1cjpkeuE=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=T2B+voZGeJZ0+Lplz5eJ+gORSZEO1m7rzNIi3hOfL6095ORu4KLCeP/iO47F4UPKsiM+Ydwx1gRZ6vS8afKaEPOt86QpRFOGJ1xsFdm1Sk/EhqtZMgcBXHIDRmgNdhIaLP5EUJ9fyx/ME1cNhcPea7HqjnpITDTf92B42kjtc5s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UWj7f97l; 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="UWj7f97l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 074C11F00A3F; Fri, 4 Sep 2026 13:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788527439; bh=jcEsTXyp5i8RTAWhuFmJwyeV5GnJkSjGyQJoL99qHRc=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=UWj7f97lHFrkD5ok4xA5PUwLkENTVqgefCSShczT6Ps7g/81GbSD+f+CcXOWErbNm Ztq2v/vADb5/OZOcN40arbk32oObA4dOWlbkbSLSbwnMrldNe2GfZG+cwXtjE7NhUj ktlfBvuIsrmNlwYN61XndnbN67Mh8N+QNHrp6pnvzlOYsgjIItpM8KQG3+0D5sbz+0 G70wxF8KplV9k/pIxcmDt0kx288hNOTWB1+GDOSZHvY+gPzPsj53HoMAjJPsK/kbAf j6um+mlzJV6MLj+JDcgjc+qjcmyjL7rszKA6PrsW6XBD4mBGZnx5A0b6G63xEhTwyp v/l6C4dkHJ9UA== 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 1x2Tgi-00000004rKf-2NnI; Fri, 04 Sep 2026 13:10:36 +0000 Date: Fri, 04 Sep 2026 14:13:10 +0100 Message-ID: <87zexx40t5.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown Cc: Oliver Upton , Fuad Tabba , Joey Gouly , Steffen Eiden , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , Mark Rutland , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] KVM: arm64: Initialise TCR2_EL2 for nVHE mode In-Reply-To: References: <20260904-kvm-arm64-nvhe-pie-v1-0-29d59f245e6c@kernel.org> <20260904-kvm-arm64-nvhe-pie-v1-1-29d59f245e6c@kernel.org> <86o6ed4gln.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: broonie@kernel.org, oupton@kernel.org, fuad.tabba@linux.dev, joey.gouly@arm.com, seiden@linux.ibm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.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 Fri, 04 Sep 2026 12:35:22 +0100, Mark Brown wrote: > > On Fri, Sep 04, 2026 at 08:32:04AM +0100, Marc Zyngier wrote: > > Mark Brown wrote: > > > > +alternative_if ARM64_HAS_TCR2 > > > + /* > > > + * Disable any features we enabled in case the next user doesn't > > > + * have TCR2_EL2 support. > > > + */ > > > + msr REG_TCR2_EL2, xzr > > > +alternative_else_nop_endif > > > I don't see the point of this. The MMU is off, and if the next piece > > of SW can't correctly initialise the HW, that's its problem. > > So we don't care about reverting back to users who are just plain > unaware of the register? In practice for Linux that's fairly old > kernels, but people might feel adverturous and try or try some non-Linux > thing. This stuff is all a bit edge casey with what we support. I certainly do not care. If you kexec an ancient kernel on new HW and can't correctly initialise it, you lose. Don't do that. M. -- Jazz isn't dead. It just smells funny.