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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A87E8C4167D for ; Thu, 14 Dec 2023 16:45:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3D6C78D00CF; Thu, 14 Dec 2023 11:45:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 385618D00C7; Thu, 14 Dec 2023 11:45:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 24FE68D00CF; Thu, 14 Dec 2023 11:45:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 113C68D00C7 for ; Thu, 14 Dec 2023 11:45:50 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id C89C6A0C5E for ; Thu, 14 Dec 2023 16:45:49 +0000 (UTC) X-FDA: 81566000418.20.BDB1393 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf28.hostedemail.com (Postfix) with ESMTP id 061A3C0009 for ; Thu, 14 Dec 2023 16:45:46 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=none; spf=pass (imf28.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702572347; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rVHC7qucLdIpZNCRLInfOhEzXtaiKZBf5CJ1offgEYI=; b=5EXUyBmfWEWYVKLm75FRguVOy3ia91q2FUld8cEVhltYoU3ydXg2z9R4jirMGWYuo/HAq0 mEl/ScJgzuj/alRdgRfiTZkg6uZrsg6zyujus5aBNxkVVfV+eHlAe98keCIW0NjJKqbPlP CgmSSxjSZnm1FlbuEuFhgjEjm5sGJ54= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; spf=pass (imf28.hostedemail.com: domain of jonathan.cameron@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=jonathan.cameron@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702572347; a=rsa-sha256; cv=none; b=0Zc4Q/jbaZteK+bsaE8FjVdIp4PZo9ZWQA6ZljRl/901R8QK6XLlNNKlN5PCWzgShKa9t6 w17iqh7ZRyWnOcigvJZjJPLn1W/dtW0ujrSsv1O6xg/95KPxR54LSSBK1gSk92LpKI6bSt AYD0fs5v4nMIHWYxqZeTrK2zE+bdCJQ= Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4SrdVc6P6Cz67CtB; Fri, 15 Dec 2023 00:44:40 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id AF11C1400CA; Fri, 15 Dec 2023 00:45:43 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 14 Dec 2023 16:45:43 +0000 Date: Thu, 14 Dec 2023 16:45:41 +0000 From: Jonathan Cameron To: Jean-Philippe Brucker CC: Robin Murphy , Will Deacon , "Ryan Roberts" , Catalin Marinas , Ard Biesheuvel , Marc Zyngier , "Oliver Upton" , James Morse , "Suzuki K Poulose" , Zenghui Yu , "Andrey Ryabinin" , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , "Andrew Morton" , Anshuman Khandual , Matthew Wilcox , Yu Zhao , Mark Rutland , David Hildenbrand , Kefeng Wang , John Hubbard , Zi Yan , Barry Song <21cnbao@gmail.com>, Alistair Popple , Yang Shi , , , , Subject: Re: [PATCH v3 12/15] arm64/mm: Split __flush_tlb_range() to elide trailing DSB Message-ID: <20231214164541.000027a1@Huawei.com> In-Reply-To: <20231214152206.GA3625745@myrica> References: <20231204105440.61448-1-ryan.roberts@arm.com> <20231204105440.61448-13-ryan.roberts@arm.com> <20231212113517.GA28857@willie-the-truck> <0969c413-bf40-4c46-9f1e-a92101ff2d2e@arm.com> <2e6f06d3-6c8e-4b44-b6f2-e55bd5be83d6@arm.com> <20231214121336.GA1015@willie-the-truck> <20231214152206.GA3625745@myrica> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml500006.china.huawei.com (7.191.161.198) To lhrpeml500005.china.huawei.com (7.191.163.240) X-Rspamd-Queue-Id: 061A3C0009 X-Rspam-User: X-Stat-Signature: g5iiz6aqowhweas5dqodoeuutuee3to6 X-Rspamd-Server: rspam01 X-HE-Tag: 1702572346-458185 X-HE-Meta: U2FsdGVkX19Mi8QSXVoxIeDjaQWv4rrJT0hl4E2IBRBfHVo1DpaVDBM1dLfwPHQF6rhCM69tgixaip+KV/L/nRlzjOQfLKJqpox5mf94JTZCvdDUSs5hPobuM65sVzMYML4M/lC8DElJYCKmV1DUURdaVIjWkG7iuKS5XgfEfqzOKIY9bJ4OeLs8PNo9L2eO038FbGJZNZdWGJXd2huCk8eEKty2RJkvkpiAynti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qg+3v7dcs9UVACBbGhtwjCdaVSRcRMTOFcKjE4JfOLfq3z89CZvfClvYjv 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: List-Subscribe: List-Unsubscribe: On Thu, 14 Dec 2023 15:22:06 +0000 Jean-Philippe Brucker wrote: > On Thu, Dec 14, 2023 at 12:30:55PM +0000, Robin Murphy wrote: > > > Robin, Jean-Philippe -- do we need to make sure that the SMMU has completed > > > its TLB invalidation before issuing an ATC invalidate? My half-baked worry > > > is whether or not an ATS request could refill the ATC before the TLBI > > > has completed, therefore rendering the ATC invalidation useless. > > > > I would agree, and the spec for CMD_ATC_INV does call out a > > TLBI->sync->ATCI->sync sequence. At the moment the SVA notifier is issuing > > its own command-based TLBIs anyway so the necessary sync is implicit there, > > but if and when we get BTM support wired up properly it would be nice not to > > have to bodge in an additional sync/DSB. > > Yes agreed, with BTM the CPU must call the notifier that issues ATC > invalidation after completing the TLBI+DSB instructions. > > SMMU IHI0070F.a 3.9.1 ATS Interface > > Software must ensure that the SMMU TLB invalidation is complete before > initiating the ATC invalidation. > > I'm guessing BTM will be enabled in the SMMU driver sometime soon, given > that there already is one implementation in the wild that could use it. I > think we didn't enable it because of the lack of separation between shared > and private VMIDs, but that may now be solvable with the recent rework of > the VMID allocator. > +CC Shameer. We'll indeed need to fix this when enabling BTM. Thanks for the heads up. Jonathan > Thanks, > Jean >