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 170E1ECAAD5 for ; Mon, 12 Sep 2022 15:22:30 +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=3yWz6lTi9X5NljcY2VZ6ggs+tNGe4Qu9t/JnmNeXDKo=; b=GOpA4GMBO9/ADD roEvPs3Xt2/k84M4Z8EeXt72Rc0jHQ3CFAZ2pO1oKUtaLStitmph3evRq2vF44B8Z18GP7ZpZwkvc 0zioPMY+AtJcU0TdA+LYO5MRoAL4uRwT0Dwew/0QyhtZcsrOgheKd8sBjMp+U0la4MdLWYtgRMQGb Q2Flhl6UZ9i1fcwSwkiyOdpMhTqZG4F55J51Ua7O2qaUPJbW1jbTZBtmwaZ2b8uzi61P7kG4UTCl4 S5TcfQikzuGP0AFxGbIylLTGstLtfl81VvM+pxjM1WZtnYpldtUKjvVA2XZKqOMMuTZEwAEBcwAth 33N558BDdLKf14E7uIuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oXlFE-00B2xe-UQ; Mon, 12 Sep 2022 15:21:09 +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 1oXlF8-00B2tP-Uw for linux-arm-kernel@lists.infradead.org; Mon, 12 Sep 2022 15:21:07 +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 41360106F; Mon, 12 Sep 2022 08:21:05 -0700 (PDT) Received: from [10.57.49.22] (unknown [10.57.49.22]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2558C3F73D; Mon, 12 Sep 2022 08:20:58 -0700 (PDT) Message-ID: Date: Mon, 12 Sep 2022 16:20:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH 1/3] arm64: cpufeature: Force HWCAP to be based on the sysreg visible to user-space To: James Morse , linux-arm-kernel@lists.infradead.org Cc: Catalin Marinas , Will Deacon References: <20220909165938.3931307-1-james.morse@arm.com> <20220909165938.3931307-2-james.morse@arm.com> From: Suzuki K Poulose In-Reply-To: <20220909165938.3931307-2-james.morse@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220912_082103_074745_DB22AB96 X-CRM114-Status: GOOD ( 13.16 ) 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 09/09/2022 17:59, James Morse wrote: > arm64 advertises hardware features to user-space via HWCAPs, and by > emulating access to the CPUs id registers. The cpufeature code has a > sanitised system-wide view of an id register, and a sanitised user-space > view of an id register, where some features use their 'safe' value > instead of the hardware value. > > It is currently possible for a HWCAP to be advertised where the user-space > view of the id register does not show the feature as supported. > Erratum workaround need to remove both the HWCAP, and the feature from > the user-space view of the id register. This involves duplicating the > code, and spreading it over cpufeature.c and cpu_errata.c. > > Make the HWCAP code use the user-space view of id registers. This ensures > the values never diverge, and allows erratum workaround to remove HWCAP > by modifying the user-space view of the id register. That sounds good to me. > > Signed-off-by: James Morse Reviewed-by: Suzuki K Poulose _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel