Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1247006ybt; Thu, 25 Jun 2020 01:05:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzT8aB1RkB7Omdu3g5WgaWzLuV+Un+1lCoO8eAWCmznWPHGwZsT+TpBsmgeiKOnpe27ZimS X-Received: by 2002:a50:b0a1:: with SMTP id j30mr31000425edd.387.1593072319401; Thu, 25 Jun 2020 01:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593072319; cv=none; d=google.com; s=arc-20160816; b=jymx1qt5d9buz/ai5bdw1T0UOcsENq/sxDHbyYmuBtXSalsLTl5uxJ2J928nRO9Hmt oLPn2DcjJqothxM+q5p1TUluE3zoMwCcwjgoEK5KlAwpwhNPwnOLsLMf8YHtDqkGvnhH ny/VqMcdKWXq/NDQRQDg31f6B39XMog9xWT3G55BCFczJH5EaeGP8HNLIHxIu1Aiqldt kKG+C6FznxfiT+hWsLynJPzYDdtTNs4S35VA/sRv6qF6E9HBUnU3DdbMxWGmadbTfUvr Brh+4m39/wP8ETpHzu5hfc4LqVOypxpq9m6TbRhBdskdU4a94ksKNvdIdyBndCjKLh9t yRTQ== 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=+wXhM7zxwVL301O3gaxDw+p5ongHQSMbsNS3UhruZno=; b=YiOToPpGjj+kxv0aY6nQ92OlaMx0z4/KedGkNa/mPeRmPI8k/cNOvhnFal2mqZAEa6 z/9/C8JC9uZUEosaxsC0r63ohqTXZ+D4Q37xBuUez8Ogxo7ggU1qm/ennajFln9RN4V7 cwg0dKCgBEJJDb4zlHxEmY43i+Yc+YFgAgtBzhZIRgbCdHDsZXnmA+VXHkf7POiszP9K yMPN9c5dX5xMet+/BJ9YKpwJG+ZMilOcpb5JKtEEFSCNhm5WMOs/eVAiMmS/Q6l2ZBz2 qXAp5ETzCbB99V08Vp2d6gtaxQ6peiMaTEB3vUGh2IRLnjwUB8tof1j5mAlsDe8grjzL X6kw== 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 j18si69517edp.389.2020.06.25.01.04.56; Thu, 25 Jun 2020 01:05:19 -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 S2390675AbgFYIEN (ORCPT + 99 others); Thu, 25 Jun 2020 04:04:13 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:6317 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390531AbgFYIDg (ORCPT ); Thu, 25 Jun 2020 04:03:36 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id F3283E3998D28F9F9FAD; Thu, 25 Jun 2020 16:03:31 +0800 (CST) Received: from DESKTOP-KKJBAGG.china.huawei.com (10.173.220.25) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Thu, 25 Jun 2020 16:03:24 +0800 From: Zhenyu Ye To: , , , , , , , , , , , , , , , , CC: , , , , , , , , , Subject: [RESEND PATCH v5 0/6] arm64: tlb: add support for TTL feature Date: Thu, 25 Jun 2020 16:03:08 +0800 Message-ID: <20200625080314.230-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: v5: rebase the series on Linux 5.8-rc2. 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.26.2