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 A121B3AE19B for ; Fri, 31 Jul 2026 15:13:25 +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=1785510806; cv=none; b=cP6tRrNIXaCKyGEaXTxweej9wsItzvC+wsUzuf9ODCGa59+ed7Z7HXcQmwcw0OmlCnyH86liLp6NNi8Xp2YeB/V/XeCuUaNLmnkBdYGAIT8DT/RT3J/UQZeA/zQ/Ef7seXFeDN2v5IBY7WA2vv1cTAuZMdGC82icghrjPKREsUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785510806; c=relaxed/simple; bh=N30UcEEsAqqq0tnIk65wLn50b5770C4dPeI3/pEiWok=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=olDjo3TNQYoAB73YFHOcBWsoYCqIIRAKfXVNaOUgBJNFjpICaf4CS9KRH1okREizNewsLWehrWVguM/CU/PsPDob7LcM48ow0saf1FlEvSwWxnqcKqoJLvQpgl8KcsBexuYjSbx6pXinP+S0Ijot8wurSSpruV1TGquVWsYz/1c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HxP/lZcO; 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="HxP/lZcO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D60F21F000E9; Fri, 31 Jul 2026 15:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785510805; bh=MTV8+yiU3k6de+WXb2mc3kleT5uKD/pTgFM6tA8U944=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=HxP/lZcOvqnIe4XpjhtStBYWqaYQt6Y3gGgUIo5MSchImNpRdjJiq647xJ9Bm1fQe wZwB97DxcT/x2LqDiRkFzzd7mCXIE1zcD3ZIQVgHfOLQKtK/R3R/eRTByRvM06K0f6 Z+BotDBFfnogB147dv4WBKlWTudpymSgZXBCZ2q3chljlWjkGdyk7lnRyDpLXPVaC4 wainOZ6tHOCQnCM7iKE0XGVHraLbCcQIdlY/q8P8E6+iLVqUVzwR54QgwSrtse35O+ otxVUJE1lbqGrHAgk+0SJxnVuxVbimCC6b0KcEBU3ybTKO2YVWEou/0xjKt9u5/s7H Xnsp+Qi9W1L5A== Date: Fri, 31 Jul 2026 16:13:20 +0100 From: Will Deacon To: Linu Cherian Cc: Catalin Marinas , Ryan Roberts , Kevin Brodsky , Anshuman Khandual , Suzuki K Poulose , Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Gavin Shan Subject: Re: [PATCH v4 6/6] arm64: cpufeature: Detect BBML3 based on ID_AA64MMFR2_EL1.BBM Message-ID: References: <20260723044034.2983651-1-linu.cherian@arm.com> <20260723044034.2983651-7-linu.cherian@arm.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: <20260723044034.2983651-7-linu.cherian@arm.com> On Thu, Jul 23, 2026 at 10:10:33AM +0530, Linu Cherian wrote: > Add ID_AA64MMFR2_EL1.BBM based BBML3 feature detection in > cpu_supports_bbml3() so that cpus with the feature would > not have to be added into MIDR based supports_bbml3_list. > > Reviewed-by: Gavin Shan > Reviewed-by: Anshuman Khandual > Signed-off-by: Linu Cherian > --- > arch/arm64/kernel/cpufeature.c | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > > diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c > index 896bafdb00b1..dbd7d187520c 100644 > --- a/arch/arm64/kernel/cpufeature.c > +++ b/arch/arm64/kernel/cpufeature.c > @@ -2133,6 +2133,12 @@ static bool hvhe_possible(const struct arm64_cpu_capabilities *entry, > > bool cpu_supports_bbml3(void) > { > + u64 mmfr2; > + > + mmfr2 = __read_sysreg_by_encoding(SYS_ID_AA64MMFR2_EL1); > + if (SYS_FIELD_GET(ID_AA64MMFR2_EL1, BBM, mmfr2) >= ID_AA64MMFR2_EL1_BBM_3) > + return true; This is a bit of a nit, but I think it would be more consistent to use has_cpuid_feature() here instead of __read_sysreg_by_encoding(), similarly to how we handle kpti in unmap_kernel_at_el0() (which also has both an ID register field and a list of MIDRs). Will