From patchwork Wed Mar 11 02:53:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Ye X-Patchwork-Id: 11430595 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 07D4E14BC for ; Wed, 11 Mar 2020 02:56:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D39F6222C4 for ; Wed, 11 Mar 2020 02:56:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D39F6222C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C47596B0003; Tue, 10 Mar 2020 22:56:28 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BFD5D6B0007; Tue, 10 Mar 2020 22:56:28 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B0C956B0008; Tue, 10 Mar 2020 22:56:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0154.hostedemail.com [216.40.44.154]) by kanga.kvack.org (Postfix) with ESMTP id 7BDD36B0003 for ; Tue, 10 Mar 2020 22:56:28 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 2DC03942D for ; Wed, 11 Mar 2020 02:56:28 +0000 (UTC) X-FDA: 76581568056.05.test62_3867a48c04521 X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,yezhenyu2@huawei.com,,RULES_HIT:30036:30054:30075,0,RBL:45.249.212.190:@huawei.com:.lbl8.mailshell.net-64.95.201.95 62.18.2.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: test62_3867a48c04521 X-Filterd-Recvd-Size: 2579 Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Wed, 11 Mar 2020 02:56:27 +0000 (UTC) Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id D688528DB561F007B992; Wed, 11 Mar 2020 10:56:23 +0800 (CST) Received: from DESKTOP-KKJBAGG.china.huawei.com (10.173.220.25) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Wed, 11 Mar 2020 10:56:14 +0800 From: Zhenyu Ye To: , , , , , , , CC: , , , , , , , Subject: [RFC PATCH v1 0/3] arm64: tlb: add support for TTL field Date: Wed, 11 Mar 2020 10:53:06 +0800 Message-ID: <20200311025309.1743-1-yezhenyu2@huawei.com> X-Mailer: git-send-email 2.22.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.173.220.25] X-CFilter-Loop: Reflected X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: ARMv8.4-TTL provides the TTL field in tlbi instruction to indicate the level of translation table walk holding the leaf entry for the address that is being invalidated. Hardware can use this information to determine if there was a risk of splintering. This set of patches adds TTL field to __TLBI_ADDR, and uses Architecture-specific MM context to pass the TTL value to tlb interface. The default value of TTL is 0, which will not have any impact on the TLB maintenance instructions. The last patch trys to use TTL field in some obviously tlb-flush interface. Zhenyu Ye (3): arm64: tlb: add TTL field to __TLBI_ADDR arm64: tlb: use mm_struct.context.flags to indicate TTL arm64: tlb: add support for TTL in some functions arch/arm64/include/asm/cpucaps.h | 3 ++- arch/arm64/include/asm/mmu.h | 11 ++++++++++ arch/arm64/include/asm/sysreg.h | 4 ++++ arch/arm64/include/asm/tlb.h | 3 +++ arch/arm64/include/asm/tlbflush.h | 35 +++++++++++++++++++++++-------- arch/arm64/kernel/cpufeature.c | 10 +++++++++ arch/arm64/kernel/sys_compat.c | 2 +- arch/arm64/mm/hugetlbpage.c | 2 ++ 8 files changed, 59 insertions(+), 11 deletions(-)