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 09A67ECAAA1 for ; Thu, 15 Sep 2022 13:41:07 +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:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LvGeZcpGlgXRBLmjHif+9XZtvVMG68PObGGypCBqPXQ=; b=jBUihdo0SIqr0Z /aol97VCY7yhExDUsa0cSBeMP0vFz6FiCcrUZ9DPNPJ0cw+j6IWnjY6qU2yP0Sznw4E2XEYxSCpSR 21wTu80Lzqgr+FapuQfrLeA14dc+1+0gSJodJIensVTDjZl1QQIvgI/5GLOLjUgNfz/5Kk4luRL9Y GcRwKzc1p6h5fFPD+5uQ8Z/B7baVMqsysuwU10iL22ZwIoziN9ZYc+RpSSgArpxfFXD7zsBHPx9NT DKlNw5qmaKImCr4OAjku6QV4dK9CrAcnXwP1jKA4zKKNT4wONSJVyljEXlOqrv/tafhiEBk2UTeLv By9+rC1/Q918xRHG/vPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYp63-009XXw-9U; Thu, 15 Sep 2022 13:40:03 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYp5r-009XRa-6f for linux-arm-kernel@lists.infradead.org; Thu, 15 Sep 2022 13:39:52 +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 9E54B1692; Thu, 15 Sep 2022 06:39:54 -0700 (PDT) Received: from [10.1.197.78] (eglon.cambridge.arm.com [10.1.197.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4FC303F71A; Thu, 15 Sep 2022 06:39:47 -0700 (PDT) Message-ID: <6218c72e-2468-6f04-c0c5-993e1f59842c@arm.com> Date: Thu, 15 Sep 2022 14:39:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 0/3] arm64: errata: remove BF16 HWCAP due to incorrect result on Cortex-A510 Content-Language: en-GB To: Robin Murphy , linux-arm-kernel@lists.infradead.org Cc: Catalin Marinas , Suzuki K Poulose , Will Deacon References: <20220909165938.3931307-1-james.morse@arm.com> <5aad4afe-bf1e-42aa-49c7-f1a2481960fa@arm.com> From: James Morse In-Reply-To: <5aad4afe-bf1e-42aa-49c7-f1a2481960fa@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220915_063951_354684_6EEA6FD5 X-CRM114-Status: GOOD ( 13.93 ) 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 Hi Robin, On 09/09/2022 19:29, Robin Murphy wrote: > On 2022-09-09 17:59, James Morse wrote: >> Cortex-A510 has an erratum where the BFMMLA or VMMLA instructions might >> produce the incorrect result. This only happens if two Cortex-A510 CPUs >> are configured by the SoC manafacturer in a particular way to share some >> hardware, and are using it at the same time. It isn't possible for linux >> to know how the CPUs were configured, so the only option is to disable >> the BF16 feature for all Cortex-A510 CPUs. > Hmm, the TRM doesn't seem to describe any obvious restrictions on accessing IMP_CPUCFR_EL1 > - is there some other nefarious secret at play there? HCR_EL2.TIDCP. KVM traps all IMP_* registers from EL1, and has no ability to emulate them. For an erratum workaround at EL1, touching an imp-def register is the wrong thing to do. We could add some discovery API with firmware to determine if the part is affected, but I think that is overkill for this. I'm pretty sure affected Cortex-A510 silicon is only in mobile phones, which can have the Kconfig option disabled if the target platform isn't affected. (Even with GKI, I assume things don't run one kernel image in the same way distros do) Thanks, James _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel