Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1318670ybg; Tue, 2 Jun 2020 07:01:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEJV8sTiUhB9HhO3t5TN1IyrjOjS0ANmah5d+QUJWYwSDp/KiHlovwTNZY612g81VqlKpG X-Received: by 2002:a17:906:6403:: with SMTP id d3mr15761294ejm.386.1591106481787; Tue, 02 Jun 2020 07:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591106481; cv=none; d=google.com; s=arc-20160816; b=1D9Fj1ouloz+t75wQt6XUS2rBMIF6s9pZA97mH9avVEov87ZipxEdRqJVcYiT5h9Dq 1CQwJ9aTuln/AX9nkbr+H60yfLWobD9fmXuf/PkE+cgzR+N3MWN+nwXfjvnjJkulFDNN Vn0eQZkqYuol9yQuIHbBav81DOyUn0Kjc2koVIPv5OhdWzc3g45ZKUURvc9IlSL5KkPe 7UDsqYTWp0aKRmofYApRIAsecf4JXTMgj9QPUp5Plc4AUdC2HqWxlxLjlZ2gM8xWCtHJ lFcJKeap9PEoBGpW4v90bsV6l7fw61hCdMS94+gKm7N76ZJF67D7DU8rhJ/fROedVY0S Dmqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=xPAGFjWyA7GAKWkPYZ/ZJcw0QA+2l+jCyHV8shExHF4=; b=sDc6dUOFOnk54QRSEeik0W+JIjxjT5dSsA6NngAHpBqWJCyEdZS2OSkPVX13osZvYy F6fIPUGv+s+dAe587sFCXz7E6k2ArILeqtZuIn2PsIMCsg+Cv/R69yfYhvQMUxnRS6lH lerfuavDh440dBJ+Av9V4+f4k6VEQSD3B0lUVMDZxE/On5XNZ/ob4ogrV65WjTHU15GA kXiSzNl4b0HSMG9sygEQRBjgQVWAQcbl0XpdynlGcJqf4TXQIPIRffYTLPYPtjZgch84 uwsRMC/RSMlTc1eGfq9jXlbhhJWdOrO7cg0863OS/2R+jyIWoWDZjNqesjRPgSvXZ2s7 URyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si1545816edy.606.2020.06.02.07.00.57; Tue, 02 Jun 2020 07:01:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726162AbgFBN7I (ORCPT + 99 others); Tue, 2 Jun 2020 09:59:08 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5769 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725841AbgFBN7I (ORCPT ); Tue, 2 Jun 2020 09:59:08 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A2F4C9FFFE30778C5DEF; Tue, 2 Jun 2020 21:59:05 +0800 (CST) Received: from DESKTOP-KKJBAGG.china.huawei.com (10.173.220.25) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Tue, 2 Jun 2020 21:58:58 +0800 From: Zhenyu Ye To: , , , , , , , , , , , , , , , , CC: , , , , , , , , , Subject: [PATCH v4 0/6] arm64: tlb: add support for TTL feature Date: Tue, 2 Jun 2020 21:58:30 +0800 Message-ID: <20200602135836.1620-1-yezhenyu2@huawei.com> X-Mailer: git-send-email 2.22.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.173.220.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to reduce the cost of TLB invalidation, ARMv8.4 provides the TTL field in TLBI instruction. The TTL field indicates the level of page table walk holding the leaf entry for the address being invalidated. This series provide support for this feature. When ARMv8.4-TTL is implemented, the operand for TLBIs looks like below: * +----------+-------+----------------------+ * | ASID | TTL | BADDR | * +----------+-------+----------------------+ * |63 48|47 44|43 0| See patches for details, Thanks. -- ChangeList: v4: implement flush_*_tlb_range only on arm64. v3: minor changes: reduce the indentation levels of __tlbi_level(). v2: rebase series on Linux 5.7-rc1 and simplify the code implementation. v1: add support for TTL feature in arm64. Marc Zyngier (2): arm64: Detect the ARMv8.4 TTL feature arm64: Add level-hinted TLB invalidation helper Peter Zijlstra (Intel) (1): tlb: mmu_gather: add tlb_flush_*_range APIs Zhenyu Ye (3): arm64: Add tlbi_user_level TLB invalidation helper arm64: tlb: Set the TTL field in flush_tlb_range arm64: tlb: Set the TTL field in flush_*_tlb_range arch/arm64/include/asm/cpucaps.h | 3 +- arch/arm64/include/asm/pgtable.h | 10 ++++++ arch/arm64/include/asm/sysreg.h | 1 + arch/arm64/include/asm/tlb.h | 29 +++++++++++++++- arch/arm64/include/asm/tlbflush.h | 54 +++++++++++++++++++++++++----- arch/arm64/kernel/cpufeature.c | 11 +++++++ include/asm-generic/tlb.h | 55 ++++++++++++++++++++++--------- 7 files changed, 138 insertions(+), 25 deletions(-) -- 2.19.1