From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5832AC18E5A for ; Wed, 11 Mar 2020 11:29:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 23E3322525 for ; Wed, 11 Mar 2020 11:29:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23E3322525 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 B62AA6B0003; Wed, 11 Mar 2020 07:29:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AEB676B0006; Wed, 11 Mar 2020 07:29:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9DB026B0007; Wed, 11 Mar 2020 07:29:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0025.hostedemail.com [216.40.44.25]) by kanga.kvack.org (Postfix) with ESMTP id 834486B0003 for ; Wed, 11 Mar 2020 07:29:56 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4A66E40EE for ; Wed, 11 Mar 2020 11:29:56 +0000 (UTC) X-FDA: 76582861992.05.sofa76_1c570b8937253 X-HE-Tag: sofa76_1c570b8937253 X-Filterd-Recvd-Size: 3343 Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Wed, 11 Mar 2020 11:29:54 +0000 (UTC) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2C5005F22DA3ED759626; Wed, 11 Mar 2020 19:29:47 +0800 (CST) Received: from [127.0.0.1] (10.173.220.25) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Wed, 11 Mar 2020 19:29:37 +0800 Subject: Re: [RFC PATCH v1 0/3] arm64: tlb: add support for TTL field To: Marc Zyngier CC: , , , , , , , , , , , , , , References: <20200311025309.1743-1-yezhenyu2@huawei.com> <247ad619edf17eb266f856d937dac826@kernel.org> From: "yezhenyu (A)" Message-ID: <6279257b-2b8c-10d0-8bb8-b0f4b851febb@huawei.com> Date: Wed, 11 Mar 2020 19:29:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <247ad619edf17eb266f856d937dac826@kernel.org> Content-Type: text/plain; charset="UTF-8" X-Originating-IP: [10.173.220.25] X-CFilter-Loop: Reflected Content-Transfer-Encoding: quoted-printable 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: Hi Marc, On 2020/3/11 17:12, Marc Zyngier wrote: > Zhenyu, >=20 > On 2020-03-11 02:53, Zhenyu Ye wrote: >> 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 interfac= e. >> >> 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. >=20 > I have already posted some support for ARMv8.4-TTL as part of my NV ser= ies [1], > patches 62, 67, 68 and 69. This only deals with Stage-2 translation so = far. > If you intend to add Stage-1, please build on top of what I have alread= y posted > (I can extract the patches on a separate branch if you want). >=20 > Thanks, >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 M. >=20 > [1] https://lore.kernel.org/linux-arm-kernel/20200211174938.27809-1-maz= @kernel.org/ I just readed your code changes to TTL. You pass the TTL value by changin= g the function interface, which only involves the ARM and ARM64 architectures i= n Stage-2 translation. However, in Stage-1, many common interfaces(such as flush_tlb_range) need= to be modified, which involves very much architectures. So I try to use MM cont= ext in mm_struct to pass the TTL value. I will send patch v2 based on top of your kvm-arm64/nv-5.6-rc1 branch soo= n. https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log= /?h=3Dkvm-arm64/nv-5.6-rc1 Thanks, Zhenyu