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 25A2BC6FA89 for ; Thu, 15 Sep 2022 14:23:34 +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-Type: Content-Transfer-Encoding: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=FR8+tR6sW/ZdVb9FoccHkGlrRx6N53AkYJVSOgQWMVs=; b=EbNLc4MPFbV1yx WEoICtXcht/PhnUlLuQBhTdQ4SkKw0eMI3jWCMsXyG0wTVGJqRxGUFW7YuLMV72ktnIrqDKU5dJIC nI0jkwVkTidjmQnTD01dFkcFg8MMLz9cNhcGtWdGpa3/Tq9DZUYgJtqteQX3VlINvM40L1PU+HiAC LZVlcLk2Kl7qRNFHsNHlGkQaTlsQ8gqNIDk0PfqAmsZkr6MbsvfEvDp8M5koTRmWD4+o/8BVaA5Yc 2ChT+08BOnAivDHa0FLx79RmCCrhOsL0LPzN15/F/KaZkPeHcD91r2FslZpfB45WyHXVWAEQSElwd 26+xbUsGsH3c2dpv0DGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oYpl8-00Ajbi-Gd; Thu, 15 Sep 2022 14:22:30 +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 1oYpkc-00Airl-Tm for linux-arm-kernel@lists.infradead.org; Thu, 15 Sep 2022 14:22: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 3AA411682; Thu, 15 Sep 2022 07:22:01 -0700 (PDT) Received: from [10.57.18.118] (unknown [10.57.18.118]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ECDF73F73D; Thu, 15 Sep 2022 07:21:53 -0700 (PDT) Message-ID: <2467ca3e-e813-7e71-71db-b068fdba9a8b@arm.com> Date: Thu, 15 Sep 2022 15:21:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH 0/3] arm64: errata: remove BF16 HWCAP due to incorrect result on Cortex-A510 Content-Language: en-GB To: James Morse , 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> <6218c72e-2468-6f04-c0c5-993e1f59842c@arm.com> From: Robin Murphy In-Reply-To: <6218c72e-2468-6f04-c0c5-993e1f59842c@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220915_072159_097783_38FA7F3C X-CRM114-Status: GOOD ( 19.13 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-09-15 14:39, James Morse wrote: > 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. Aha, indeed I should have looked more closely at the pseudocode. > 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. Well, there's no real reason we couldn't make KVM handle this case, but that doesn't help if we're booted at EL1 under some other hypervisor, so in general I concur. > 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) I suppose it wouldn't take *too* much to check this in init_el2 and stash a "no actually it's fine" flag for later, but whether even that's worth it depends on how big the impact of losing BF16 on unaffected configurations actually is (which I have no idea about). If someone does care then that can always be added later, so that's good enough for me! Cheers, Robin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel