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 9B2B3C25B75 for ; Mon, 3 Jun 2024 09:39:12 +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=S+osisyv3mJ+NocwCGlVDKb/ruF5rhiLJe5CQplJzvU=; b=tD20quNqXg8Aq4 n3tZEUSlyFf+qdzfVShZmQ+5TPzxM+4DMsR9HNDha1AlfVE+eT/tUeM7RtturgqxNCynZBI4LDNB9 D7DH9WjrpUYmFJoikgO5Rh2VoS96Ed06hLqPFTtDXrwFan7IVBhipHqM1QJg8miZRIaK1sf0MT0Gq GvfH91eNcL10vVHjKJW4x0iczScTPofBPGUnCxUfXC93TdZqOr7PJgRulaOgPZL8rUOvRKoeMdX0d 4dXZw4ERhfYe1AlTeRLc3tXSnd5vMwxulVblvWDrznTl1FJEg0TCPv77RM/TSBD1oLxP6p4T+pvcO Lst+fc8RneqFfRgS1HEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sE49e-0000000GGco-3XOg; Mon, 03 Jun 2024 09:39:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sE49c-0000000GGZy-1Ajq for linux-arm-kernel@lists.infradead.org; Mon, 03 Jun 2024 09:39:01 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 04ECD1042; Mon, 3 Jun 2024 02:39:22 -0700 (PDT) Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2B29A3F762; Mon, 3 Jun 2024 02:38:55 -0700 (PDT) Date: Mon, 3 Jun 2024 10:38:46 +0100 From: Mark Rutland To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, catalin.marinas@arm.com, Mark Brown , James Clark , Rob Herring , Marc Zyngier , Suzuki Poulose , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , linux-perf-users@vger.kernel.org, Jonathan Corbet , Oliver Upton , linux-doc@vger.kernel.org Subject: Re: [PATCH V17 4/9] arm64/boot: Enable EL2 requirements for BRBE Message-ID: References: <20240405024639.1179064-1-anshuman.khandual@arm.com> <20240405024639.1179064-5-anshuman.khandual@arm.com> <7d765803-49ed-4847-a2d1-f0c3b3e2c79c@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7d765803-49ed-4847-a2d1-f0c3b3e2c79c@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240603_023900_456556_0E1A94EB X-CRM114-Status: GOOD ( 23.22 ) 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 Mon, Jun 03, 2024 at 02:41:32PM +0530, Anshuman Khandual wrote: > On 5/29/24 16:21, Mark Rutland wrote: > > On Fri, Apr 05, 2024 at 08:16:34AM +0530, Anshuman Khandual wrote: > >> + For CPUs with feature Branch Record Buffer Extension (FEAT_BRBE): > >> + > >> + - If the kernel is entered at EL2 and EL1 is present: > >> + > >> + - BRBCR_EL1.CC (bit 3) must be initialised to 0b1. > >> + - BRBCR_EL1.MPRED (bit 4) must be initialised to 0b1. > > > > IIUC this isn't necessary; if the kernel is entered at EL2, it's capable > > of initializing the EL1 regs, and it doesn't look like this silently > > affects something we'd need in the absence of a BRBE driver. > > No, this does not affect anything other than the BRBE driver. Ok. > > AFAICT the __init_el2_brbe() code you add below handles this, so I think > > this is redundant and can be deleted. > > Did not understand the above. __init_el2_brbe() handles setting both BRBCR_EL2 > and BRBCR_EL1 for CC and MPRED config irrespective of whether the kernel enters > EL2 directly or enters EL1 via EL2. But should not that be documented here for > both those scenarios ? OR because once the kernel is in EL2, it can configure > EL1 as required, so it is not a booting requirement anymore ? The latter -- since the kernel can set this up, and only needs to do that for the BRBE driver to work, this doesn't need to be a requiremnt on FW/bootloader. So we can drop this when the kernel is booted at EL2. Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel