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 5BA4CC49EA1 for ; Tue, 6 Aug 2024 13:13:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:CC:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SYnC5oK8eX0UnjuB1boH/ahrSaKXeafAMs7b1LP4AR8=; b=Y7GUZL/xuIfG5mUUGdr7y9SzO3 T66Wa7EfLL6f+OZY3xXtmC17gyVBGLzreGxpJYjX/ty0UU7AjDNXVC4OyYKzf6qKcbu3wZ3fXm3tp byCD2J9v8CxkvpLR0s1ia1St6huIl8lcpeo1sEZ6rlH0aAIy2oa5HqtvLThBMyJsXkjWm9PBKOyHj dsj3153wx0ksC+K9knX1iShO+oJZLTYXeotHbH3CHPIgf1f+f6ctbyPyRqyGqzDkVaZ3fZblkZZz8 porjEwBNyH9dXnxuJaE/PmXVkWAifDzxbYkePuxVm0n7i7hzBemOSNGOEsHfX0ZZehxiuVcH+Uqor Rk68W70g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbK0U-00000001fsh-42UB; Tue, 06 Aug 2024 13:13:42 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbJyV-00000001f5V-0Ict for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 13:11:41 +0000 Received: from mail.maildlp.com (unknown [172.19.163.48]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4WdYYY5HHzzfZtC; Tue, 6 Aug 2024 21:09:37 +0800 (CST) Received: from kwepemd200014.china.huawei.com (unknown [7.221.188.8]) by mail.maildlp.com (Postfix) with ESMTPS id 2912E18006C; Tue, 6 Aug 2024 21:11:31 +0800 (CST) Received: from [10.67.121.177] (10.67.121.177) by kwepemd200014.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Tue, 6 Aug 2024 21:11:30 +0800 CC: , , , , , , , , , , , , , Subject: Re: [PATCH 1/2] arm64: Add support for FEAT_HAFT To: Marc Zyngier References: <20240802093458.32683-1-yangyicong@huawei.com> <20240802093458.32683-2-yangyicong@huawei.com> <86ed771a98.wl-maz@kernel.org> <86le1a2ieq.wl-maz@kernel.org> From: Yicong Yang Message-ID: <62dee426-b4ad-3200-3433-9be7eaa3231a@huawei.com> Date: Tue, 6 Aug 2024 21:11:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <86le1a2ieq.wl-maz@kernel.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.177] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemd200014.china.huawei.com (7.221.188.8) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240806_061139_309237_F4C1DCE6 X-CRM114-Status: GOOD ( 14.49 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2024/8/6 15:57, Marc Zyngier wrote: > On Tue, 06 Aug 2024 04:09:09 +0100, > Yicong Yang wrote: >> >>>> +#ifdef CONFIG_ARM64_HAFT >>>> + { >>>> + .desc = "Hardware managed Access Flag for Table Descriptor", >>>> + /* >>>> + * Per Spec, software management of Access Flag for Table >>>> + * descriptor is not supported, so make this feature system >>>> + * wide. >>>> + */ >>> >>> I don't understand what you mean by this. Can you please clarify? >>> >> >> Since this cannot be managed by the software, we should restrict all the CPUs >> in the system to have and enable this feature which is indicated by >> ARM64_CPUCAP_BOOT_CPU_FEATURE. It's not possible for part of the CPUs don't have >> this feature and managed manually. >> >> I make this comment here since it's handled different from what ARM64_HW_DBM does (which >> is ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE). Maybe it's redundant and can be dropped. > > Ah, I see what you mean. I think this is still important to capture, > but maybe in a clearer manner. Something like: > > Contrary to the page/block access flag, the table access flag > cannot be emulated in software (no access fault will occur). > Therefore mandate that all CPUs have FEAT_HAFT. > Will refine the comment here in v2. Thanks for the suggestion. Thanks.