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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E40ECC4332F for ; Thu, 14 Dec 2023 15:22:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zpgT33k0zCJ43FE1KfSvX8kUPGVX3Y2uJ/B5enq2b3M=; b=4jLCl3beis3Tge 8XYdbjCRiug4uEW80c5/m+hIgBmI5Udi8U7y9PL9IoTj4NrNs5HB8mvgNAb79dpfsc3u1duFPfemG PyjmJ+cdqiqcrHMToqdRIPcUtSUs5tLCmSEc7iayJF7DwbWenAcdj/B2sJRfgnBXarZi8Pj4+ob2e 4FezWbufhMGQ+faJIDr9XtTMIMt3DSCoYGM09pUgpz7YciNtNVAc6P9pClGaXrV4dWYN7mpsj10f5 piyNV4gv4YyVGtQpOBQ0U9+qdED/QuT58YHXzCeweaHg2nUZsoMryxyTWuyVr1EBatTg1MUqtsRGv BZf7KNwDFMBQQPYTDgsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDnXL-000f6P-0K; Thu, 14 Dec 2023 15:22:07 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDnXH-000f4L-2m for linux-arm-kernel@lists.infradead.org; Thu, 14 Dec 2023 15:22:05 +0000 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3333074512bso439232f8f.1 for ; Thu, 14 Dec 2023 07:22:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702567319; x=1703172119; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/bSSRhAXdmXAROOGjFIgArjcRM7oqtGCLaLHkAUJnSg=; b=F+yFiPjfTunGtq2RCMlIB4SKnLGgW779V1i5DyHqhtA1kmBoJ/V14T078Emk2OOtbx NYPDgBPwylZRoUgIaXk16BSwhZfVti9mf0MQi/n+/isr7gCHPvPM7lPmvWi7BFUm/AvG LoXxxM2ITcwn0SjUPIXOZJntTC7i8LKOd2C5AKjxAVgrfO0j1kh8DPdCAqfej0rsGbMO q23/dzyOy7cndOm7/nKzXaIYhrm7jB3bRMKMNZmxB9jUnSSsCTVMXOtwMRI7/UgtyWiB s5yDdGtz8hNDkirjbQOdm6iLCEv3usSVYE6wCwmTEIprOdAicnFRUtgTHTQ6yK/VPELD XMcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702567319; x=1703172119; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/bSSRhAXdmXAROOGjFIgArjcRM7oqtGCLaLHkAUJnSg=; b=SrfyRycIR+N1udvXaPSTXIdhogf3k8uSYbjXTX/I8PbEbdvEOaUAHhIopd1xTprWQ/ FWhyKvQyBxaDKeGgjcbuynWvnsD9JaqclBK04cYhAhVFgRjHuDCOwIKEGldYZpVYoq2U sVq9NW3WcKeLmy0EOfaMtFv5PScLxm/mrUh6Ryej2iXqkkPNzfifWhotLH5noxVOkAsj lqO69460fGsBm4Vxoc06Te2ABdoIcxZtbjYnNAqE7FXIwEtthNSYqeaEweCQXvNcS1mZ f9TDbUm5TGQH1HtfFt08Pt+Sy8DxuVR/OZYJZXsaGLzU5lMcucD6Ii8seZi3mWnop/OE C01g== X-Gm-Message-State: AOJu0YwsnnoSate1Jm6KZWiMNOu4Bqd8Pn6AttVJl1Exmn14/AN+SsNi RwYUHHvdMoDnTfWe8b/JMOaeJQ== X-Google-Smtp-Source: AGHT+IFNYdxveqf3zoi/Rky5KhkHGvNYerFKbxknnd39XZPaV13yasmExLP0rV2+gBo1TMNuyKiYqA== X-Received: by 2002:a7b:cb93:0:b0:40b:5e4a:2348 with SMTP id m19-20020a7bcb93000000b0040b5e4a2348mr5298274wmi.74.1702567319038; Thu, 14 Dec 2023 07:21:59 -0800 (PST) Received: from myrica ([2.221.137.100]) by smtp.gmail.com with ESMTPSA id m14-20020a05600c4f4e00b0040b30be6244sm25072367wmq.24.2023.12.14.07.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 07:21:58 -0800 (PST) Date: Thu, 14 Dec 2023 15:22:06 +0000 From: Jean-Philippe Brucker To: Robin Murphy Cc: 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 , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 12/15] arm64/mm: Split __flush_tlb_range() to elide trailing DSB Message-ID: <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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231214_072203_901591_5B9EC0BD X-CRM114-Status: GOOD ( 16.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Thanks, Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel