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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2166C33CB2 for ; Wed, 15 Jan 2020 09:49:25 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A54EF222C3 for ; Wed, 15 Jan 2020 09:49:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jRvqCZWA"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="K6U3xjVM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A54EF222C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=4+ITUQYCsZqh0Tz+pC9haANz3LKknZd102uJkRDH+XE=; b=jRvqCZWA4O2oOz 22Y2h2IHqmVOAykui3Hp6F+Crn0JyM0w95pqA84PGtAnDZLvZ+zNiW5wR+H5+RLN6Njvj3LqSZXJq yZY1ec+2qZ0uXZp4ngRF2SYnNrDtIqr9AnyniCqBBGl0OtOJ/uN/OK/k4cBr0eUkrBn37wFU90y5K w/G/cDXe6fpHOzolC6fr6yxrEyNP2SJSfwQ2k8LUDEk3jBh5TmwasSqBTJzJVOyFfqk1QgV8BlUhN KvezFmSe3XL6I2NGlfywFuH/myE4kOHMI7puO1H41VnG/eGv3N7tacBfMAnar4GE+Kw6FNPGPsTyF lisycYCOyGtyPVkYgxlQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1irfIj-0006Uv-4k; Wed, 15 Jan 2020 09:49:25 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1irfIf-0006Tw-Ra for linux-arm-kernel@lists.infradead.org; Wed, 15 Jan 2020 09:49:23 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 585F82187F; Wed, 15 Jan 2020 09:49:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579081761; bh=kQEYyTRF9+ukK/xlFWoKZxJOpIIXWl+uj7Qfml47YIU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K6U3xjVMoZRI+DVMWuutNNkjNF96YThrvkbWoAjPGUN0RVnPlNNooQ8EcyINvdEFx 3a/uApzPmBEtxEu8Oi5LJ15Ff3EZiU5JjY7rHiENVN3w7rb68BNa3rg2S0m2Bx8mgc P1ISA76foIpNPnYGpVljskJtTGBAcrKqdAF5BTTc= Date: Wed, 15 Jan 2020 09:49:17 +0000 From: Will Deacon To: Steven Price Subject: Re: [PATCH v2] arm64: cpufeature: Export matrix and other features to userspace Message-ID: <20200115094916.GC21692@willie-the-truck> References: <20191216113337.13882-1-steven.price@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191216113337.13882-1-steven.price@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200115_014921_938212_96718E8A X-CRM114-Status: GOOD ( 16.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , julien@xen.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Suzuki K Poulose Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 16, 2019 at 11:33:37AM +0000, Steven Price wrote: > Export the features introduced as part of ARMv8.6 exposed in the > ID_AA64ISAR1_EL1 and ID_AA64ZFR0_EL1 registers. This introduces the > Matrix features (ARMv8.2-I8MM, ARMv8.2-F64MM and ARMv8.2-F32MM) along > with BFloat16 (Armv8.2-BF16), speculation invalidation (SPECRES) and > Data Gathering Hint (ARMv8.0-DGH). > > Signed-off-by: Julien Grall > [Added other features in those registers] > Signed-off-by: Steven Price > --- > This is a v2 of Julien's patch[1] extended to export all the new > features contained within the ID_AA64ISAR1_EL1 and ID_AA64ZFR0_EL1 > registers. > > [1] https://lore.kernel.org/linux-arm-kernel/20191025171056.30641-1-julien.grall@arm.com/ > > Documentation/arm64/cpu-feature-registers.rst | 16 ++++++++++ > Documentation/arm64/elf_hwcaps.rst | 31 +++++++++++++++++++ > arch/arm64/include/asm/hwcap.h | 8 +++++ > arch/arm64/include/asm/sysreg.h | 12 +++++++ > arch/arm64/include/uapi/asm/hwcap.h | 8 +++++ > arch/arm64/kernel/cpufeature.c | 20 ++++++++++++ > arch/arm64/kernel/cpuinfo.c | 8 +++++ > 7 files changed, 103 insertions(+) > > diff --git a/Documentation/arm64/cpu-feature-registers.rst b/Documentation/arm64/cpu-feature-registers.rst > index b6e44884e3ad..5382981533f8 100644 > --- a/Documentation/arm64/cpu-feature-registers.rst > +++ b/Documentation/arm64/cpu-feature-registers.rst > @@ -200,6 +200,14 @@ infrastructure: > +------------------------------+---------+---------+ > | Name | bits | visible | > +------------------------------+---------+---------+ > + | I8MM | [55-52] | y | > + +------------------------------+---------+---------+ > + | DGH | [51-48] | y | > + +------------------------------+---------+---------+ > + | BF16 | [47-44] | y | > + +------------------------------+---------+---------+ > + | SPECRES | [43-40] | y | > + +------------------------------+---------+---------+ I applied this for CI testing last night, but actually I think it's broken. AFAICT, the instructions introduced by SPECRES are behind an SCTLR_EL1 enable (EnRCTX) which defaults to disabled, so we should either be enabling them before setting the HWCAP or not exposing them at all. Given that the instructions are not broadcast and are likely to be very expensive, I don't think that exposing them to EL0 is a good idea. In other words, I'll drop the SPECRES parts from this patch. Sound ok? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel