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 787C3CA0EE8 for ; Wed, 17 Sep 2025 08:21:49 +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=ZX6kWlvgzKMdbhi52sRpXsMRDzpnrEkkzxNjg/plsg4=; b=AZD/nCY92jWGatXybSr6D3hX9N rwqrI5DeaqnIq0pJM05Yv/T4t3sadrzJ29Dpl0wYy0sMy0TkSYOvIN8RYcnmiOiRAKSyKDz2HN9ZG +q3q50dPsj8ijsUmm9NoA7QjiMy6lfdAYGqVv1tZ13doL1aT4m08BifW0OqsH3pn9PFPPt5o6VDuC ObjpzynKPg+Ci+z1l4Hyv+ExZzMpnlmV+WGnIjiXtbibVLi8IKG1MrfkZkFkLvD3W+HRDK68lDn1Y HBPuSFOD6Os97ckLjTBmOu1oSzey9XgsCe5R1AaAuFNKKbXOwLaZlM0h0CzSL+9kEYPQfO0E/+TmC XQP0++Tg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uynQ3-0000000Acih-2hqA; Wed, 17 Sep 2025 08:21:39 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uynQ1-0000000AciK-3tpO for linux-arm-kernel@lists.infradead.org; Wed, 17 Sep 2025 08:21:39 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 4B6E4407E1; Wed, 17 Sep 2025 08:21:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B470C4CEF0; Wed, 17 Sep 2025 08:21:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758097297; bh=QG9kIwOrTVti9EkrTlseIQagno/pqmtWR2+SW9AJx3E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cMpdQ96BU+A6ndiDqHZSkshRb53SaceqVsBr1BGZKhPQ/QPkdhsW7F72TsoIb2O+7 /O+6Dyi+Sx81P+TpBEtc5DotFOgO8sc6Asioe2p3ASRPDkfa7andrQScaUvoDPc7Rb kFw+sL8cOyzmtAqp3NieCs02tH4frnghKDnHz7O+I92iIj+9FmJ6ZM5Klfr8V4zs+/ EKy/VGvNJS6JZJq5dVQEFff36UoSiSfyY+a5rstjhXE56+xtWfeHDdFID2Cd+k5eDd +rWfiTzhRUaLRccAiWCkm7udhM5kMN3Rke9HjGJ4TUkmOZupJgidX/WUm1UMQHw1wO ePdETqh6uhUPw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-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 1uynPz-00000006ynu-0Vc7; Wed, 17 Sep 2025 08:21:35 +0000 Date: Wed, 17 Sep 2025 09:21:34 +0100 Message-ID: <86plbp1oc1.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, Joey Gouly , Suzuki K Poulose , Zenghui Yu Subject: Re: [PATCH] KVM: arm64: Fix kvm_vcpu_{set,is}_be() to deal with EL2 state In-Reply-To: References: <20250916161103.1040727-1-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) 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: oliver.upton@linux.dev, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250917_012137_986201_308E58A5 X-CRM114-Status: GOOD ( 17.15 ) 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 Wed, 17 Sep 2025 06:21:09 +0100, Oliver Upton wrote: > > On Tue, Sep 16, 2025 at 05:11:03PM +0100, Marc Zyngier wrote: > > Nobody really cares about BE, but KVM currently only deals with > > SCTLR_EL1 when evaluating or setting the endianness in PSCI, > > meaning that we evaluate whatever the L2 state has been at some point. > > > > Teach these primitives about SCTLR_EL2, and forget about BE... > > > > Signed-off-by: Marc Zyngier > > You know, I was about to say "don't we need to sanitise this?" although > that seems to already be in place. Nice. Only for SCTLR_EL1. SCTLR_EL2, annoyingly enough, isn't, owing to plenty of bits depending on E2H. It's on my long list of things to address, but I'd like a common mechanism that'd deal with horrors such as CNTHCTL_EL2... > Reviewed-by: Oliver Upton Thanks, M. -- Without deviation from the norm, progress is not possible.