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 5B0E4C6FD1F for ; Thu, 21 Mar 2024 23:35:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wSCEpqZBBh++OY1HmWBNs4dWTHd2ICfEMHBfmGAzUTM=; b=Ts2xfRTV4uAmm9 MEfLkYIOyZOATixXhCGw0oCP7Q/BAxLU7YePmm/jEcOAKtH1NiP/zpyf5ZYc/dmPXlneBLL1MwbAU 99BjXs1hfIWIdhDni8SjVMMVWog9wsL68IK3YhBeIx8qpOuWOmAkTtgpJWjpGrVM5MAacnM0HQRRq Y4BND1qYtJazbv6emaf6iryuwOE5HIsuR6HqAxPeoNivpV3ZQKbO18F0tER4wXasewDtzn6C8Mcwu ILIksq+USycocbM8kED8DJ1YihAihKYFI+oiVy1O2yD6Mk/Y6bY9qx3aLRCfCGtwoqE+bZANzaBDZ TfWuT7XGr8XUMs75xabQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnRw3-000000057FW-0dnE; Thu, 21 Mar 2024 23:34:59 +0000 Received: from out-177.mta1.migadu.com ([2001:41d0:203:375::b1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnRw0-000000057ED-1bqg for linux-arm-kernel@lists.infradead.org; Thu, 21 Mar 2024 23:34:57 +0000 Date: Thu, 21 Mar 2024 16:34:40 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1711064090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y28AiBsCw/hcVqXY41xh8of+9x1tuzj467kpOpPe2NM=; b=kHN+uyMrwB/hsauC/kUzNTYP4eU+Xa4tU2QMLArejIn/vzgA0sbjB27N2ukaGw2bd/STQN 2HvxPmXcNM2ZhnsC89DjYWPZwEdXhI5jToV97L2tvAtI17G2LgZ1FV/Vyn5TKxKrrJ+Yhi cR/GDIea3CGJh1+eMfJDE6IJVRiFR8w= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Catalin Marinas Cc: Marc Zyngier , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, Will Deacon , James Morse , Suzuki K Poulose , Zenghui Yu Subject: Re: [PATCH] arm64: Fix early handling of FEAT_E2H0 not being implemented Message-ID: References: <20240321115414.3169115-1-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240321_163456_692885_067A1214 X-CRM114-Status: GOOD ( 20.47 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Mar 21, 2024 at 08:16:15PM +0000, Catalin Marinas wrote: > On Thu, Mar 21, 2024 at 11:54:14AM +0000, Marc Zyngier wrote: > > Commit 3944382fa6f2 introduced checks for the FEAT_E2H0 not being > > implemented. However, the check is absolutely wrong and makes a > > point it testing a bit that is guaranteed to be zero. > > > > On top of that, the detection happens way too late, after the > > init_el2_state has done its job. > > > > This went undetected because the HW this was tested on has E2H being > > RAO/WI, and not RES1. However, the bug shows up when run as a nested > > guest, where HCR_EL2.E2H is not necessarily set to 1. As a result, > > booting the kernel in hVHE mode fails with timer accesses being > > cought in a trap loop (which was fun to debug). > > > > Fix the check for ID_AA64MMFR4_EL1.E2H0, and set the HCR_EL2.E2H bit > > early so that it can be checked by the rest of the init sequence. > > > > With this, hVHE works again in a NV environment that doesn't have > > FEAT_E2H0. > > > > Fixes: 3944382fa6f2 ("arm64: Treat HCR_EL2.E2H as RES1 when ID_AA64MMFR4_EL1.E2H0 is negative") > > Signed-off-by: Marc Zyngier > > Acked-by: Catalin Marinas Thanks! > I assume Oliver will take it, otherwise I can pick it up after -rc1 > since I don't have the fixed commit in my tree. I'll pick it up but wont be sending anything out until -rc1. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel